diff --git a/src/ol/interaction/dragrotateandzoominteraction.js b/src/ol/interaction/dragrotateandzoominteraction.js index 95df6f5320..9cc3ab89ca 100644 --- a/src/ol/interaction/dragrotateandzoominteraction.js +++ b/src/ol/interaction/dragrotateandzoominteraction.js @@ -79,7 +79,7 @@ ol.interaction.DragRotateAndZoom.prototype.handleDragStart = browserEvent.offsetX - size.width / 2, size.height / 2 - browserEvent.offsetY); var theta = Math.atan2(delta.y, delta.x); - this.startRotation_ = (view.getRotation() || 0) + theta; + this.startRotation_ = view.getRotation() + theta; this.startRatio_ = resolution / delta.magnitude(); map.requestRenderFrame(); return true; diff --git a/src/ol/interaction/dragrotateinteraction.js b/src/ol/interaction/dragrotateinteraction.js index f951f6fd2c..048a847957 100644 --- a/src/ol/interaction/dragrotateinteraction.js +++ b/src/ol/interaction/dragrotateinteraction.js @@ -67,7 +67,7 @@ ol.interaction.DragRotate.prototype.handleDragStart = var theta = Math.atan2( size.height / 2 - offset.y, offset.x - size.width / 2); - this.startRotation_ = (view.getRotation() || 0) + theta; + this.startRotation_ = view.getRotation() + theta; return true; } else { return false;