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

@@ -113,7 +113,7 @@ class DragRotateAndZoom extends PointerInteraction {
const map = mapBrowserEvent.map;
const view = map.getView();
view.setHint(ViewHint.INTERACTING, -1);
view.endInteraction();
const direction = this.lastScaleDelta_ - 1;
rotate(view, view.getRotation());
zoom(view, view.getResolution(), undefined, this.duration_, direction);
@@ -130,7 +130,7 @@ class DragRotateAndZoom extends PointerInteraction {
}
if (this.condition_(mapBrowserEvent)) {
mapBrowserEvent.map.getView().setHint(ViewHint.INTERACTING, 1);
mapBrowserEvent.map.getView().beginInteraction();
this.lastAngle_ = undefined;
this.lastMagnitude_ = undefined;
return true;