File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed
Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -1405,21 +1405,19 @@ extension DrawerView: UIGestureRecognizerDelegate {
14051405
14061406 // Check if the pan gesture is primarily horizontal (like swipe-to-delete)
14071407 // If so, don't begin to allow those gestures to work
1408- if let panGesture = gestureRecognizer as? UIPanGestureRecognizer {
1409- let translation = panGesture. translation ( in: self )
1410- let velocity = panGesture. velocity ( in: self )
1411-
1412- // If there's meaningful translation/velocity, check direction
1413- if abs ( translation. x) > 0 || abs ( translation. y) > 0 {
1414- let isHorizontal = abs ( translation. x) > abs ( translation. y)
1415- if isHorizontal {
1416- return false
1417- }
1418- } else if abs ( velocity. x) > 0 || abs ( velocity. y) > 0 {
1419- let isHorizontal = abs ( velocity. x) > abs ( velocity. y)
1420- if isHorizontal {
1421- return false
1422- }
1408+ let translation = panGestureRecognizer. translation ( in: self )
1409+ let velocity = panGestureRecognizer. velocity ( in: self )
1410+
1411+ // If there's meaningful translation/velocity, check direction
1412+ if abs ( translation. x) > 0 || abs ( translation. y) > 0 {
1413+ let isHorizontal = abs ( translation. x) > abs ( translation. y)
1414+ if isHorizontal {
1415+ return false
1416+ }
1417+ } else if abs ( velocity. x) > 0 || abs ( velocity. y) > 0 {
1418+ let isHorizontal = abs ( velocity. x) > abs ( velocity. y)
1419+ if isHorizontal {
1420+ return false
14231421 }
14241422 }
14251423
You can’t perform that action at this time.
0 commit comments