summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2019-08-20 18:53:05 -0700
committerjmkiley <jordan.kiley@mapbox.com>2019-08-20 18:53:05 -0700
commitcfd21f9747188e873f2e14e9fc5d43948b2269c2 (patch)
treefd06359dfdb3747cd54504c5fadeb3b0901ba4cc
parent5e754f83f7de88032e47740b423a460da4886d19 (diff)
downloadqtlocation-mapboxgl-upstream/jmkiley-rotate-pinch.tar.gz
[ios] Whitespace, reset rotation thresholdupstream/jmkiley-rotate-pinch
-rw-r--r--platform/ios/src/MGLMapView.mm6
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];