diff options
author | Jason Wray <friedbunny@users.noreply.github.com> | 2019-06-20 10:33:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-20 10:33:32 -0700 |
commit | b98dbd21212e611235292236f0b23be1a77a6157 (patch) | |
tree | 8cdb213e345679ac7555526bfa904dcd9bb710b2 /platform/ios | |
parent | 6aa065c7a1b5fac812f5cde29d1c34a0ac793988 (diff) | |
download | qtlocation-mapboxgl-b98dbd21212e611235292236f0b23be1a77a6157.tar.gz |
[ios] Require two fingers for duration of tilt gesture
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/CHANGELOG.md | 4 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index d6583d277a..01d70385ac 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -2,6 +2,10 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. +## 5.2.0 + +* Fixed an issue where the two-finger tilt gesture would continue after lifting one finger. ([#14969](https://github.com/mapbox/mapbox-gl-native/pull/14969)) + ## 5.1.0 - June 19, 2019 ### Styles and rendering diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 85a2e3be92..9693e3cff9 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -2062,6 +2062,12 @@ public: if (twoFingerDrag.state == UIGestureRecognizerStateBegan || twoFingerDrag.state == UIGestureRecognizerStateChanged) { + if (twoFingerDrag.numberOfTouches != 2) + { + twoFingerDrag.state = UIGestureRecognizerStateEnded; + return; + } + CGFloat gestureDistance = CGPoint([twoFingerDrag translationInView:twoFingerDrag.view]).y; CGFloat slowdown = 2.0; |