diff options
author | Julian Rex <julian.rex@mapbox.com> | 2019-09-05 00:21:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-05 00:21:58 -0400 |
commit | 96581fd3ff4e4239d5498d7fc3d3a490c800d2e0 (patch) | |
tree | 5facff1f15c18e9f4ae2745efe95999f88538694 /src/mbgl/map | |
parent | fa3bf5855bb5ff6ea2daa2cc1e265f1c17ea81b2 (diff) | |
download | qtlocation-mapboxgl-96581fd3ff4e4239d5498d7fc3d3a490c800d2e0.tar.gz |
[core, ios] Call transitionFinishFn for jumpTo. (#15473)
Diffstat (limited to 'src/mbgl/map')
-rw-r--r-- | src/mbgl/map/transform.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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; } |