Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
check for infinite zoom in factor
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Mar 8, 2017
1 parent 4e6b227 commit 2e739e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mbgl/map/transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ void Transform::flyTo(const CameraOptions &camera, const AnimationOptions &anima

// When u₀ = u₁, the optimal path doesn’t require both ascent and descent.
bool isClose = std::abs(u1) < 0.000001;
// Perform a more or less instantaneous transition if the path is too short or zoom out factor is inf.
if ((isClose && std::abs(w0 - w1) < 0.000001) || isinf(r(0))) {
// Perform a more or less instantaneous transition if the path is too short or zoom in/out factor is infinte
if ((isClose && std::abs(w0 - w1) < 0.000001) || std::isinf(r(0)) || std::isinf(r(1))) {
easeTo(camera, animation);
return;
}
Expand Down

0 comments on commit 2e739e7

Please sign in to comment.