View / implemented begin- and endInteraction methods

This commit is contained in:
Olivier Guyot
2019-01-06 10:46:52 +01:00
parent 1cb934dbe3
commit 4e1ece16ed
9 changed files with 47 additions and 14 deletions

View File

@@ -97,7 +97,7 @@ class DragRotate extends PointerInteraction {
const map = mapBrowserEvent.map;
const view = map.getView();
view.setHint(ViewHint.INTERACTING, -1);
view.endInteraction();
const rotation = view.getRotation();
rotate(view, rotation, undefined, this.duration_);
return false;
@@ -114,7 +114,7 @@ class DragRotate extends PointerInteraction {
if (mouseActionButton(mapBrowserEvent) && this.condition_(mapBrowserEvent)) {
const map = mapBrowserEvent.map;
map.getView().setHint(ViewHint.INTERACTING, 1);
map.getView().beginInteraction();
this.lastAngle_ = undefined;
return true;
} else {