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
+2 -2
View File
@@ -152,7 +152,7 @@ class MouseWheelZoom extends Interaction {
decrementInteractingHint_() {
this.trackpadTimeoutId_ = undefined;
const view = this.getMap().getView();
view.setHint(ViewHint.INTERACTING, -1);
view.endInteraction();
}
/**
@@ -218,7 +218,7 @@ class MouseWheelZoom extends Interaction {
if (this.trackpadTimeoutId_) {
clearTimeout(this.trackpadTimeoutId_);
} else {
view.setHint(ViewHint.INTERACTING, 1);
view.beginInteraction();
}
this.trackpadTimeoutId_ = setTimeout(this.decrementInteractingHint_.bind(this), this.trackpadEventGap_);
let resolution = view.getResolution() * Math.pow(2, delta / this.trackpadDeltaPerZoom_);