summaryrefslogtreecommitdiff
path: root/src/mbgl
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-05-19 16:18:26 -0700
committerMinh Nguyễn <mxn@1ec5.org>2015-05-19 16:18:26 -0700
commitb6765a2eb1bbb21a31c82d99d05ae5f1c35d4902 (patch)
tree5443bbf4b2a23707d6e2d8c2779ff5f83dd9647f /src/mbgl
parent2a02f42b4a0bd3d9b6b0313e2dcb78ca0953b98e (diff)
parentd876274ad19866c8395c97ef4fd1f31eddf3b23c (diff)
downloadqtlocation-mapboxgl-b6765a2eb1bbb21a31c82d99d05ae5f1c35d4902.tar.gz
Merge pull request #1453 from mapbox/1ec5-whee-2
Prevent full-circle spin during animated rotation
Diffstat (limited to 'src/mbgl')
-rw-r--r--src/mbgl/map/transform.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mbgl/map/transform.cpp b/src/mbgl/map/transform.cpp
index 32127fb26f..f5e9f00998 100644
--- a/src/mbgl/map/transform.cpp
+++ b/src/mbgl/map/transform.cpp
@@ -384,6 +384,7 @@ void Transform::_setAngle(double new_angle, const Duration duration) {
MapChangeRegionWillChange);
final.angle = _normalizeAngle(new_angle, current.angle);
+ current.angle = _normalizeAngle(current.angle, final.angle);
if (duration == Duration::zero()) {
current.angle = final.angle;