From 703842a02127cd00980700400446477a74dc9b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 10 Apr 2013 15:19:41 +0200 Subject: [PATCH] Touch rotate interaction requests render frames --- 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 c69638dd0c..853dff1079 100644 --- a/src/ol/interaction/touchrotateinteraction.js +++ b/src/ol/interaction/touchrotateinteraction.js @@ -98,6 +98,7 @@ ol.interaction.TouchRotate.prototype.handleTouchMove = // rotate if (this.rotating_) { var view = map.getView().getView2D(); + map.requestRenderFrame(); ol.interaction.Interaction.rotateWithoutConstraints(map, view, view.getRotation() + rotationDelta, anchor); } @@ -131,10 +132,12 @@ ol.interaction.TouchRotate.prototype.handleTouchEnd = ol.interaction.TouchRotate.prototype.handleTouchStart = function(mapBrowserEvent) { if (this.targetTouches.length >= 2) { - var view = mapBrowserEvent.map.getView(); + var map = mapBrowserEvent.map; + var view = map.getView(); this.lastAngle_ = undefined; this.rotating_ = false; this.rotationDelta_ = 0.0; + map.requestRenderFrame(); view.setHint(ol.ViewHint.INTERACTING, 1); return true; } else {