File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -530,15 +530,20 @@ class Core: NSObject, UIGestureRecognizerDelegate {
530
530
return false
531
531
}
532
532
533
- // When the current and initial point within grabber area, do scroll.
533
+ // When the current point is within grabber area but the initial point is not , do scroll.
534
534
if grabberAreaFrame. contains ( point) , !grabberAreaFrame. contains ( initialLocation) {
535
535
return true
536
536
}
537
537
538
+ // When the initial point is within grabber area and the current point is out of surface, don't scroll.
539
+ if grabberAreaFrame. contains ( initialLocation) , !surfaceView. frame. contains ( point) {
540
+ return false
541
+ }
542
+
538
543
let scrollViewFrame = scrollView. convert ( scrollView. bounds, to: surfaceView)
539
544
guard
540
- scrollViewFrame. contains ( initialLocation) , // When initialLocation not in scrollView, don't scroll.
541
- !grabberAreaFrame. contains ( point) // When point within grabber area, don't scroll.
545
+ scrollViewFrame. contains ( initialLocation) , // When the initial point not in scrollView, don't scroll.
546
+ !grabberAreaFrame. contains ( point) // When point within grabber area, don't scroll.
542
547
else {
543
548
return false
544
549
}
You can’t perform that action at this time.
0 commit comments