summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2016-10-03 17:21:38 -0700
committerGitHub <noreply@github.com>2016-10-03 17:21:38 -0700
commit26c32f5c112784a8c5f84b96150de7c8ec7fedc1 (patch)
treed5b42ad16e174bfc5079fec44800d4ce55299869 /platform
parentd4151c9f3617417a10de3e950ae6ab6fed3122fb (diff)
downloadqtlocation-mapboxgl-26c32f5c112784a8c5f84b96150de7c8ec7fedc1.tar.gz
[ios] Remove double counting of content inset top and bottom (#6566)
This removes the calls to top and bottom for content inset of the map view when calculating the edge padding for following. A previous commit added this along with the left and right values. This eliminates a bug where the map did not scroll to the correct location for the user dot and also a bug in `didUpdateLocationWithUserTrackingAnimated:` where the map panning operations would always occur because the current and correct points never matched up even if a stream of location values that were the same were processed.
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/src/MGLMapView.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 4d660f8f35..bc11303ee8 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -4173,9 +4173,9 @@ public:
CGRect boundsAroundCorrectPoint = CGRectOffset(bounds,
correctPoint.x - CGRectGetMidX(bounds),
correctPoint.y - CGRectGetMidY(bounds));
- return UIEdgeInsetsMake(CGRectGetMinY(boundsAroundCorrectPoint) - CGRectGetMinY(bounds) + self.contentInset.top,
+ return UIEdgeInsetsMake(CGRectGetMinY(boundsAroundCorrectPoint) - CGRectGetMinY(bounds),
self.contentInset.left,
- CGRectGetMaxY(bounds) - CGRectGetMaxY(boundsAroundCorrectPoint) + self.contentInset.bottom,
+ CGRectGetMaxY(bounds) - CGRectGetMaxY(boundsAroundCorrectPoint),
self.contentInset.right);
}