summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2019-07-08 16:26:33 +0200
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2019-07-09 18:07:22 +0200
commitda8ed930de1e0f8f58f1a50d14cc727c9b7132f4 (patch)
tree2afdb84fdd17e548c5b904f2dc23548962bb8f02
parent4d84e52ce23e9abb9f9ca8ee802f324ce2694218 (diff)
downloadqtlocation-mapboxgl-da8ed930de1e0f8f58f1a50d14cc727c9b7132f4.tar.gz
[core] decrease the minimum pixel distance required to interpolate during 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.
-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.