diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-01-10 23:38:09 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-01-14 00:39:56 -0800 |
commit | ac4b1b7479fe5d60f1112d5a47846a498af5c8a5 (patch) | |
tree | 4a507f0d5725bfd24880461e87090c09f72959cf /platform/osx | |
parent | d26b956a48dc2da9333b40d8d2c4371c63b372a2 (diff) | |
download | qtlocation-mapboxgl-ac4b1b7479fe5d60f1112d5a47846a498af5c8a5.tar.gz |
[core] Standardize transform origin
All Transform methods that take a PrecisionPoint now assume a “flipped” origin at the upper-left corner of the view. Previously, some methods assumed an origin at the lower-left corner.
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/src/MGLMapView.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/osx/src/MGLMapView.mm b/platform/osx/src/MGLMapView.mm index 829c3cade6..82e5e20c1c 100644 --- a/platform/osx/src/MGLMapView.mm +++ b/platform/osx/src/MGLMapView.mm @@ -1239,7 +1239,7 @@ public: _directionAtBeginningOfGesture = self.direction; } else if (gestureRecognizer.state == NSGestureRecognizerStateChanged) { NSPoint rotationPoint = [gestureRecognizer locationInView:self]; - mbgl::PrecisionPoint center(rotationPoint.x, rotationPoint.y); + mbgl::PrecisionPoint center(rotationPoint.x, self.bounds.size.height - rotationPoint.y); _mbglMap->setBearing(_directionAtBeginningOfGesture + gestureRecognizer.rotationInDegrees, center); } else if (gestureRecognizer.state == NSGestureRecognizerStateEnded || gestureRecognizer.state == NSGestureRecognizerStateCancelled) { |