[ios] Fix pinch drift ignoring delegate camera change response
This commit is contained in:
@@ -55,6 +55,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
|
||||
|
||||
## 3.7.6
|
||||
|
||||
* Fixed an issue where the pinch gesture could drift beyond bounds imposed by `-[MGLMapViewDelegate mapView:shouldChangeFromCamera:toCamera:]`. ([#11423](https://github.com/mapbox/mapbox-gl-native/pull/11423))
|
||||
* Improved the visibility of the heading indicator arrow. ([#11337](https://github.com/mapbox/mapbox-gl-native/pull/11337))
|
||||
|
||||
## 3.7.5 - February 16, 2018
|
||||
|
||||
@@ -1476,10 +1476,12 @@ public:
|
||||
double zoom = log2(newScale);
|
||||
MGLMapCamera *toCamera = [self cameraByZoomingToZoomLevel:zoom aroundAnchorPoint:centerPoint];
|
||||
|
||||
if ([self _shouldChangeFromCamera:oldCamera toCamera:toCamera])
|
||||
if ( ! [self _shouldChangeFromCamera:oldCamera toCamera:toCamera])
|
||||
{
|
||||
drift = NO;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (drift)
|
||||
{
|
||||
_mbglMap->setZoom(zoom, mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }, MGLDurationFromTimeInterval(duration));
|
||||
@@ -1730,7 +1732,9 @@ public:
|
||||
{
|
||||
[weakSelf unrotateIfNeededForGesture];
|
||||
}];
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
[self unrotateIfNeededForGesture];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user