[core, ios] Call transitionFinishFn for jumpTo. (#15473)

This commit is contained in:
Julian Rex
2019-09-05 00:21:58 -04:00
committed by GitHub
parent fa3bf5855b
commit 96581fd3ff
8 changed files with 151 additions and 16 deletions

View File

@@ -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;
}