Interactions / fix zoom level when a zoom interaction ends

This commit is contained in:
Olivier Guyot
2019-02-22 15:00:57 +01:00
parent 75c379beeb
commit f67baa0dc0
2 changed files with 14 additions and 6 deletions

View File

@@ -109,7 +109,7 @@ class DragRotateAndZoom extends PointerInteraction {
const map = mapBrowserEvent.map;
const view = map.getView();
const direction = this.lastScaleDelta_ - 1;
const direction = this.lastScaleDelta_ > 1 ? 1 : -1;
view.endInteraction(this.duration_, direction);
this.lastScaleDelta_ = 0;
return false;