Merge pull request #10302 from ahocevar/sign

Do not use Math.sign() to support very old browsers
This commit is contained in:
Andreas Hocevar
2019-11-18 08:58:35 +01:00
committed by GitHub

View File

@@ -154,7 +154,7 @@ class MouseWheelZoom extends Interaction {
endInteraction_() { endInteraction_() {
this.trackpadTimeoutId_ = undefined; this.trackpadTimeoutId_ = undefined;
const view = this.getMap().getView(); const view = this.getMap().getView();
view.endInteraction(undefined, Math.sign(this.lastDelta_), this.lastAnchor_); view.endInteraction(undefined, this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0, this.lastAnchor_);
} }
/** /**