Permalink
Browse files

Make TouchRotate interaction use rotateNoConstraint

  • Loading branch information...
1 parent 303520a commit cae2340343d9f0bc0facd6f21e837b5bd96a9956 @elemoine elemoine committed with tschaub Mar 4, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 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 {

0 comments on commit cae2340

Please sign in to comment.