diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2014-02-19 12:27:23 -0800 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2014-02-19 12:27:23 -0800 |
commit | cbf96ba1c6212e57bfa5abd696f9313fe28304fc (patch) | |
tree | 9430bc2c8ab864594f3578e1bef13fa3de261ae8 /ios | |
parent | 7f5a674a914377ca350234d46e01b38dffdf01e0 (diff) | |
download | qtlocation-mapboxgl-cbf96ba1c6212e57bfa5abd696f9313fe28304fc.tar.gz |
minor formatting
Diffstat (limited to 'ios')
-rw-r--r-- | ios/MBXViewController.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm index 040c05803e..b8cfbdb927 100644 --- a/ios/MBXViewController.mm +++ b/ios/MBXViewController.mm @@ -237,6 +237,7 @@ class MBXMapView if (pinch.state == UIGestureRecognizerStateBegan) { mapView->map.startScaling(); + self.scale = mapView->map.getScale(); } else if (pinch.state == UIGestureRecognizerStateChanged) @@ -260,6 +261,7 @@ class MBXMapView else if (pinch.state == UIGestureRecognizerStateEnded) { mapView->map.stopScaling(); + if (fabsf(pinch.velocity) < 20) return; @@ -272,7 +274,8 @@ class MBXMapView mapView->map.scaleBy(new_scale / scale, [pinch locationInView:pinch.view].x, [pinch locationInView:pinch.view].y, duration); } - else if (pinch.state == UIGestureRecognizerStateCancelled) { + else if (pinch.state == UIGestureRecognizerStateCancelled) + { mapView->map.stopScaling(); } @@ -286,6 +289,7 @@ class MBXMapView if (rotate.state == UIGestureRecognizerStateBegan) { mapView->map.startRotating(); + self.angle = mapView->map.getAngle(); } else if (rotate.state == UIGestureRecognizerStateChanged) |