diff options
author | jmkiley <jordan.kiley@mapbox.com> | 2019-08-20 18:53:05 -0700 |
---|---|---|
committer | jmkiley <jordan.kiley@mapbox.com> | 2019-08-20 18:53:05 -0700 |
commit | cfd21f9747188e873f2e14e9fc5d43948b2269c2 (patch) | |
tree | fd06359dfdb3747cd54504c5fadeb3b0901ba4cc | |
parent | 5e754f83f7de88032e47740b423a460da4886d19 (diff) | |
download | qtlocation-mapboxgl-upstream/jmkiley-rotate-pinch.tar.gz |
[ios] Whitespace, reset rotation thresholdupstream/jmkiley-rotate-pinch
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 9bf3973021..51102233cf 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1827,6 +1827,8 @@ public: self.cameraChangeReasonBitmask |= MGLCameraChangeReasonGestureRotate; + _rotationThresholdWhileZooming = [[[NSUserDefaults standardUserDefaults] objectForKey:MGLRotationThresholdWhileZoomingKey] floatValue]; + // Check whether a zoom triggered by a pinch gesture is occurring and if the rotation threshold has been met. if (MGLDegreesFromRadians(self.rotationBeforeThresholdMet) < self.rotationThresholdWhileZooming && self.isZooming && !self.isRotating) { self.rotationBeforeThresholdMet += fabs(rotate.rotation); @@ -1864,8 +1866,8 @@ public: if ([self _shouldChangeFromCamera:oldCamera toCamera:toCamera]) { self.mbglMap.jumpTo(mbgl::CameraOptions() - .withBearing(newDegrees) - .withAnchor(mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y})); + .withBearing(newDegrees) + .withAnchor(mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y})); } [self cameraIsChanging]; |