diff options
author | Jason Wray <jason@mapbox.com> | 2018-03-08 14:31:58 -0500 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2018-03-14 15:46:31 -0400 |
commit | d37edadacbe20cd9fa71100d53098291ee7ea619 (patch) | |
tree | 81de3728aa2a09595cadf2881bc93035bd45a21b /platform/ios/src | |
parent | 2230af142540a041e0583e81cda49a0064be4044 (diff) | |
download | qtlocation-mapboxgl-d37edadacbe20cd9fa71100d53098291ee7ea619.tar.gz |
[ios] Fix pinch drift ignoring delegate camera change response
Diffstat (limited to 'platform/ios/src')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 18a69a34cd..6b47dc05f7 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1476,10 +1476,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)); @@ -1730,7 +1732,9 @@ public: { [weakSelf unrotateIfNeededForGesture]; }]; - } else { + } + else + { [self unrotateIfNeededForGesture]; } } |