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

Commit

Permalink
[core] decrease the minimum pixel distance required to interpolate du…
Browse files Browse the repository at this point in the history
…ring camera animation

The changes introduced in #9199 changed the minimum required pixel distance between start and end points to >= 1px in order to interpolate, which in scenarios of big zoom changes and low pixel density can result in animation to the previous position and then a jump to the target.
  • Loading branch information
LukasPaczos committed Jul 9, 2019
1 parent 4d84e52 commit da8ed93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mbgl/map/transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void Transform::flyTo(const CameraOptions &camera, const AnimationOptions &anima
double r1 = r(1);

// When u₀ = u₁, the optimal path doesn’t require both ascent and descent.
bool isClose = std::abs(u1) < 1.0 || !std::isfinite(r0) || !std::isfinite(r1);
bool isClose = std::abs(u1) < 0.000001 || !std::isfinite(r0) || !std::isfinite(r1);

/** w(s): Returns the visible span on the ground, measured in pixels with
respect to the initial scale.
Expand Down

0 comments on commit da8ed93

Please sign in to comment.