Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[ios] Require two fingers for duration of tilt gesture #14969

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2049,6 +2049,8 @@ - (void)handleTwoFingerDragGesture:(UIPanGestureRecognizer *)twoFingerDrag
{
if ( ! self.isPitchEnabled) return;

if (twoFingerDrag.numberOfTouches != 2) return;

[self cancelTransitions];

self.cameraChangeReasonBitmask |= MGLCameraChangeReasonGestureTilt;
Expand Down