From 3cca9450027bfa31171014bfa47f4c47c8de4b72 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 18 Nov 2019 07:54:20 +0100 Subject: [PATCH] Do not use Math.sign() to support very old browsers --- src/ol/interaction/MouseWheelZoom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/interaction/MouseWheelZoom.js b/src/ol/interaction/MouseWheelZoom.js index 02824a1151..1ed762bc17 100644 --- a/src/ol/interaction/MouseWheelZoom.js +++ b/src/ol/interaction/MouseWheelZoom.js @@ -154,7 +154,7 @@ class MouseWheelZoom extends Interaction { endInteraction_() { this.trackpadTimeoutId_ = undefined; 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_); } /**