Make TouchRotate interaction use rotateNoConstraint

This commit is contained in:
Éric Lemoine
2013-03-04 18:07:56 +01:00
parent 178c68868b
commit 7d6d82519b

View File

@@ -90,7 +90,7 @@ ol.interaction.TouchRotate.prototype.handleTouchMove =
// rotate // rotate
if (this.rotating_) { 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) { if (this.targetTouches.length < 2) {
var map = mapBrowserEvent.map; var map = mapBrowserEvent.map;
var view = map.getView(); var view = map.getView();
if (this.rotating_) {
view.rotate(map, view.getRotation());
}
view.setHint(ol.ViewHint.INTERACTING, -1); view.setHint(ol.ViewHint.INTERACTING, -1);
return false; return false;
} else { } else {