diff options
author | Jason Wray <jason@mapbox.com> | 2017-02-11 16:57:09 -0500 |
---|---|---|
committer | Jason Wray <friedbunny@users.noreply.github.com> | 2017-02-13 18:35:04 -0500 |
commit | d12ac71ba76c441e8dca97d0186abe4646a7d716 (patch) | |
tree | 82836cdd4002fdfd3c2b5899be0903c0043a6b17 /platform/macos/app/MapDocument.m | |
parent | 235a06795acd8a8c084a778b19119c643bc3c931 (diff) | |
download | qtlocation-mapboxgl-d12ac71ba76c441e8dca97d0186abe4646a7d716.tar.gz |
[macos] Round non-freeform zoom gestures/commands to nearest integer
Affects:
- Double-tap gestures
- Two-finger tap gestures
- +/- button pushes
- Shortcut keys
- Menu items and shortcut keys (in macapp)
Diffstat (limited to 'platform/macos/app/MapDocument.m')
-rw-r--r-- | platform/macos/app/MapDocument.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m index 6f63542527..2de189c856 100644 --- a/platform/macos/app/MapDocument.m +++ b/platform/macos/app/MapDocument.m @@ -217,11 +217,11 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio } - (IBAction)zoomIn:(id)sender { - [self.mapView setZoomLevel:self.mapView.zoomLevel + 1 animated:YES]; + [self.mapView setZoomLevel:round(self.mapView.zoomLevel) + 1 animated:YES]; } - (IBAction)zoomOut:(id)sender { - [self.mapView setZoomLevel:self.mapView.zoomLevel - 1 animated:YES]; + [self.mapView setZoomLevel:round(self.mapView.zoomLevel) - 1 animated:YES]; } - (IBAction)snapToNorth:(id)sender { |