Merge pull request #1453 from mapbox/1ec5-whee-2

Prevent full-circle spin during animated rotation
This commit is contained in:
Minh Nguyễn
2015-05-19 16:18:26 -07:00

View File

@@ -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;