diff --git a/src/viewport.js b/src/viewport.js index 9a058968..4d8b9c9a 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -956,8 +956,8 @@ $.Viewport.prototype = { */ getRotation: function(current) { return current ? - this.degreesSpring.current.value : - this.degreesSpring.target.value; + $.euclideanModulo(this.degreesSpring.current.value, 360) : + $.euclideanModulo(this.degreesSpring.target.value, 360); }, /**