[ios] Require two fingers for duration of tilt gesture

This commit is contained in:
Jason Wray
2019-06-20 10:33:32 -07:00
committed by GitHub
parent 6aa065c7a1
commit b98dbd2121
2 changed files with 10 additions and 0 deletions

View File

@@ -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

View File

@@ -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;