[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.
This commit is contained in:
Jesse Bounds
2016-10-03 17:21:38 -07:00
committed by GitHub
parent d4151c9f36
commit 26c32f5c11

View File

@@ -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);
}