From f4e9dd5c374990e3e7f58a74892e9d4b93d24e5e Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 12 Feb 2013 15:37:08 +0100 Subject: [PATCH] view.getRotation default value already set to 0. --- src/ol/interaction/dragrotateandzoominteraction.js | 2 +- src/ol/interaction/dragrotateinteraction.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;