summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadia Barbosa <nadiabarbosa@me.com>2018-11-13 14:08:01 -0800
committerNadia Barbosa <nadiabarbosa@me.com>2018-11-19 09:42:42 -0800
commit32d1e41eb7e1e5418fb99fe8e5ee0cbbe0c1fda1 (patch)
treef7e68c8eec44b1e139b2ceaa75cdca959d0c69a9
parent9be6c8b1b77f8fc026caee8a09e0cf28e0781253 (diff)
downloadqtlocation-mapboxgl-upstream/disable-camera-animation-11415-nb.tar.gz
[ios] Don't pause camera animations when zoom/pitch/rotate/scroll are disabledupstream/disable-camera-animation-11415-nb
[ios] Move up code [ios] Changelog newline
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/src/MGLMapView.mm6
2 files changed, 7 insertions, 0 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 72ac9bdffd..8e4627b5ff 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -8,6 +8,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Fixed sporadic crash when using `MGLMapSnapshotter`. ([#13300](https://github.com/mapbox/mapbox-gl-native/pull/13300))
* Added `MGLLoggingConfiguration` and `MGLLoggingBlockHandler` that handle error and fault events produced by the SDK. ([#13235](https://github.com/mapbox/mapbox-gl-native/pull/13235))
* This SDK’s dynamic framework now has a bundle identifier of `com.mapbox.Mapbox`. ([#12857](https://github.com/mapbox/mapbox-gl-native/pull/12857))
+* Modified the behavior of the map view so that programmatic camera transitions can no longer be interrupted by user interaction when `MGLMapView.zoomEnabled`, `MGLMapView.rotateEnabled`, `MGLMapView.scrollEnabled`, and `MGLMapView.pitchEnabled` are set to false. ([#13362](https://github.com/mapbox/mapbox-gl-native/pull/13362))
## 4.6.0 - November 7, 2018
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 4880a63cb9..6a3ab4da68 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -1380,11 +1380,17 @@ public:
- (void)touchesBegan:(__unused NSSet<UITouch *> *)touches withEvent:(__unused UIEvent *)event
{
+ if (!self.zoomEnabled && !self.pitchEnabled && !self.rotateEnabled && !self.scrollEnabled)
+ {
+ return;
+ };
+
_mbglMap->setGestureInProgress(false);
if (self.userTrackingState == MGLUserTrackingStateBegan)
{
[self setUserTrackingMode:MGLUserTrackingModeNone animated:NO];
}
+
[self cancelTransitions];
}