summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2019-07-08 16:26:33 +0200
committerŁukasz Paczos <lukas.paczos@gmail.com>2019-07-08 16:26:33 +0200
commitea6b2061b5602a266a2a66e3058e0cd671eb69d4 (patch)
treef6f9ae3d8ec52f1c32bd7eb874b9a5a7c547d7b0
parent532e9dc6ae1f62c7c46f24b1277240440ecfe9ea (diff)
downloadqtlocation-mapboxgl-upstream/lp-target-interpolation-15072.tar.gz
[core] decrease the minimum pixel distance required to interpolate during camera animationupstream/lp-target-interpolation-15072
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.
-rw-r--r--src/mbgl/map/transform.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/map/transform.cpp b/src/mbgl/map/transform.cpp
index 88b559592e..a51d4dd4ff 100644
--- a/src/mbgl/map/transform.cpp
+++ b/src/mbgl/map/transform.cpp
@@ -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.