From 96581fd3ff4e4239d5498d7fc3d3a490c800d2e0 Mon Sep 17 00:00:00 2001 From: Julian Rex Date: Thu, 5 Sep 2019 00:21:58 -0400 Subject: [core, ios] Call transitionFinishFn for jumpTo. (#15473) --- src/mbgl/map/transform.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mbgl/map') diff --git a/src/mbgl/map/transform.cpp b/src/mbgl/map/transform.cpp index 925893b2d6..7ec41be37a 100644 --- a/src/mbgl/map/transform.cpp +++ b/src/mbgl/map/transform.cpp @@ -96,6 +96,9 @@ void Transform::easeTo(const CameraOptions& camera, const AnimationOptions& anim double pitch = camera.pitch ? *camera.pitch * util::DEG2RAD : getPitch(); if (std::isnan(zoom) || std::isnan(bearing) || std::isnan(pitch)) { + if (animation.transitionFinishFn) { + animation.transitionFinishFn(); + } return; } @@ -172,6 +175,9 @@ void Transform::flyTo(const CameraOptions &camera, const AnimationOptions &anima double pitch = camera.pitch ? *camera.pitch * util::DEG2RAD : getPitch(); if (std::isnan(zoom) || std::isnan(bearing) || std::isnan(pitch) || state.size.isEmpty()) { + if (animation.transitionFinishFn) { + animation.transitionFinishFn(); + } return; } @@ -274,6 +280,9 @@ void Transform::flyTo(const CameraOptions &camera, const AnimationOptions &anima if (duration == Duration::zero()) { // Perform an instantaneous transition. jumpTo(camera); + if (animation.transitionFinishFn) { + animation.transitionFinishFn(); + } return; } -- cgit v1.2.1