From 32d1e41eb7e1e5418fb99fe8e5ee0cbbe0c1fda1 Mon Sep 17 00:00:00 2001 From: Nadia Barbosa Date: Tue, 13 Nov 2018 14:08:01 -0800 Subject: [ios] Don't pause camera animations when zoom/pitch/rotate/scroll are disabled [ios] Move up code [ios] Changelog newline --- platform/ios/CHANGELOG.md | 1 + platform/ios/src/MGLMapView.mm | 6 ++++++ 2 files changed, 7 insertions(+) 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 *)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]; } -- cgit v1.2.1