From cae2340343d9f0bc0facd6f21e837b5bd96a9956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 4 Mar 2013 18:07:56 +0100 Subject: [PATCH] Make TouchRotate interaction use rotateNoConstraint --- src/ol/interaction/touchrotateinteraction.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ol/interaction/touchrotateinteraction.js b/src/ol/interaction/touchrotateinteraction.js index 1ce5d02a77..be084f7db0 100644 --- a/src/ol/interaction/touchrotateinteraction.js +++ b/src/ol/interaction/touchrotateinteraction.js @@ -90,7 +90,7 @@ ol.interaction.TouchRotate.prototype.handleTouchMove = // rotate if (this.rotating_) { - view.rotate(map, view.getRotation() + rotationDelta, anchor); + view.rotateNoConstraint(map, view.getRotation() + rotationDelta, anchor); } }; @@ -103,6 +103,9 @@ ol.interaction.TouchRotate.prototype.handleTouchEnd = if (this.targetTouches.length < 2) { var map = mapBrowserEvent.map; var view = map.getView(); + if (this.rotating_) { + view.rotate(map, view.getRotation()); + } view.setHint(ol.ViewHint.INTERACTING, -1); return false; } else {