diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp index e83a83272..49ae8c4f6 100644 --- a/platform/default/glfw_view.cpp +++ b/platform/default/glfw_view.cpp @@ -336,7 +336,10 @@ void GLFWView::run() { const bool dirty = !clean.test_and_set(); if (dirty) { const bool needsRerender = map->renderSync(); - map->nudgeTransitions(needsRerender); + GLFWView *view = reinterpret_cast(glfwGetWindowUserPointer(window)); + if (!view->tracking || !view->rotating) { + map->nudgeTransitions(needsRerender); + } } } } diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index f4dea9bae..0cce29ba1 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); } } diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp index 7570b6a74..db0393b00 100644 --- a/src/mbgl/renderer/painter.cpp +++ b/src/mbgl/renderer/painter.cpp @@ -49,7 +49,7 @@ Painter::~Painter() { } bool Painter::needsAnimation() const { - return frameHistory.needsAnimation(data.getDefaultFadeDuration()) || state.isChanging(); + return frameHistory.needsAnimation(data.getDefaultFadeDuration()); } void Painter::setup() {