diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-18 16:34:19 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-19 08:01:25 -0700 |
commit | c7e6dc4832b3b5a6752a1c04def1485d0136c1c4 (patch) | |
tree | 7578a9e0403f59d2b126df92be125fd24faf74d5 /platform/macos/src | |
parent | 553ec88dc0350b9b034a0370300653d94f092382 (diff) | |
download | qtlocation-mapboxgl-c7e6dc4832b3b5a6752a1c04def1485d0136c1c4.tar.gz |
[macos] Fix pinch gesture scaling math
Diffstat (limited to 'platform/macos/src')
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 01df48c3da..c56b32bfcf 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1456,7 +1456,7 @@ public: [self willChangeValueForKey:@"zoomLevel"]; [self willChangeValueForKey:@"centerCoordinate"]; MGLMapCamera *oldCamera = self.camera; - _mbglMap->setZoom(_zoomAtBeginningOfGesture * (1 + gestureRecognizer.magnification), center); + _mbglMap->setZoom(_zoomAtBeginningOfGesture + log2(1 + gestureRecognizer.magnification), center); if ([self.delegate respondsToSelector:@selector(mapView:shouldChangeFromCamera:toCamera:)] && ![self.delegate mapView:self shouldChangeFromCamera:oldCamera toCamera:self.camera]) { self.camera = oldCamera; |