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

@@ -76,7 +76,7 @@ class DragPan extends PointerInteraction {
handleDragEvent(mapBrowserEvent) {
if (!this.panning_) {
this.panning_ = true;
this.getMap().getView().setHint(ViewHint.INTERACTING, 1);
this.getMap().getView().beginInteraction();
}
const targetPointers = this.targetPointers;
const centroid = centroidFromPointers(targetPointers);
@@ -129,7 +129,7 @@ class DragPan extends PointerInteraction {
}
if (this.panning_) {
this.panning_ = false;
view.setHint(ViewHint.INTERACTING, -1);
view.endInteraction();
}
return false;
} else {