summaryrefslogtreecommitdiff
path: root/platform/ios
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2015-07-24 16:24:20 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2015-07-27 21:57:51 +0300
commit5e2f3b1323331f6cfa72bdbf7ae59db275c70f26 (patch)
tree054e5fbfc6d69e5f5cabeb02a9cf964e2c50afa9 /platform/ios
parent44182a30cf8374d3e35d6bc5a4275c7f6d61b108 (diff)
downloadqtlocation-mapboxgl-5e2f3b1323331f6cfa72bdbf7ae59db275c70f26.tar.gz
Avoid nudging transitions if a gesture is in progress #2
Following the same steps from #1548 and #1912 for GLFW and iOS ports. Also removed a redundant check if transform state is changing since we're already dealing with that.
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/MGLMapView.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm
index f4dea9baeb..0cce29ba1d 100644
--- a/platform/ios/MGLMapView.mm
+++ b/platform/ios/MGLMapView.mm
@@ -707,6 +707,12 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
[self updateUserLocationAnnotationView];
+ // don't nudge transitions if in the midst of a gesture.
+ if (self.pan.state == UIGestureRecognizerStateChanged ||
+ self.pinch.state == UIGestureRecognizerStateChanged ||
+ self.rotate.state == UIGestureRecognizerStateChanged ||
+ self.quickZoom.state == UIGestureRecognizerStateChanged) return;
+
_mbglMap->nudgeTransitions(needsRerender);
}
}