summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView.mm
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2018-03-08 14:31:58 -0500
committerJason Wray <jason@mapbox.com>2018-03-08 17:13:44 -0500
commitc815c1e2d661ae43584db0e6eed2a2aaf5fe7e14 (patch)
tree1e3fe97b6cc2d3b21833590123bb00a5a826d44a /platform/ios/src/MGLMapView.mm
parent7df451def6c37bd842b13954b91fe8f303ecec9f (diff)
downloadqtlocation-mapboxgl-c815c1e2d661ae43584db0e6eed2a2aaf5fe7e14.tar.gz
[ios] Fix pinch drift ignoring delegate camera change response
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r--platform/ios/src/MGLMapView.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 02f529d094..0fae5e0394 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -1459,10 +1459,12 @@ public:
double zoom = log2(newScale);
MGLMapCamera *toCamera = [self cameraByZoomingToZoomLevel:zoom aroundAnchorPoint:centerPoint];
- if ([self _shouldChangeFromCamera:oldCamera toCamera:toCamera])
+ if ( ! [self _shouldChangeFromCamera:oldCamera toCamera:toCamera])
{
drift = NO;
- } else {
+ }
+ else
+ {
if (drift)
{
_mbglMap->setZoom(zoom, mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }, MGLDurationFromTimeInterval(duration));
@@ -1695,7 +1697,9 @@ public:
{
[weakSelf unrotateIfNeededForGesture];
}];
- } else {
+ }
+ else
+ {
[self unrotateIfNeededForGesture];
}
}