diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2017-07-27 10:50:36 -0700 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2017-07-27 13:34:26 -0700 |
commit | c8c4c5d8ec7a7f819987626a7ff4d12a2e06fca5 (patch) | |
tree | 26608b916989f434899efc05692a74a9b80cac30 | |
parent | 912d9cb89e51333cd397a92e815c271270903857 (diff) | |
download | qtlocation-mapboxgl-upstream/fabian-ios-tilt-gesture-2435.tar.gz |
[ios] Make tilt gesture recognizer tolerance degree less restrictiveupstream/fabian-ios-tilt-gesture-2435
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index ddb10f4164..2e4af646a8 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1850,8 +1850,8 @@ public: east = swap; } - float angleThreshold = 20.0; - if ([self angleBetweenPoints:west east:east] > angleThreshold) { + float horizontalToleranceDegrees = 60.0; + if ([self angleBetweenPoints:west east:east] > horizontalToleranceDegrees) { return NO; } @@ -1877,16 +1877,6 @@ public: return ([validSimultaneousGestures containsObject:gestureRecognizer] && [validSimultaneousGestures containsObject:otherGestureRecognizer]); } - -- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer -{ - if (gestureRecognizer == self.twoFingerDrag && otherGestureRecognizer == self.pinch) { - return YES; - } else if (gestureRecognizer == self.twoFingerDrag && otherGestureRecognizer == self.pan) { - return YES; - } - return NO; -} - (float)angleBetweenPoints:(CGPoint)west east:(CGPoint)east { |