Update MouseWheelZoom.js

This commit is contained in:
wussup
2020-04-20 15:51:27 +02:00
committed by GitHub
parent aca8e0880c
commit ce7be53970

View File

@@ -91,7 +91,10 @@ class MouseWheelZoom extends Interaction {
* @private
* @type {boolean}
*/
this.constrainResolution_ = options.constrainResolution !== undefined ? options.constrainResolution : false;
this.constrainResolution_ =
options.constrainResolution !== undefined
? options.constrainResolution
: false;
/**
* @private
@@ -224,7 +227,7 @@ class MouseWheelZoom extends Interaction {
const view = map.getView();
if (this.mode_ === Mode.TRACKPAD &&
!(view.getConstrainResolution() || this.constrainResolution_)) {
!(view.getConstrainResolution() || this.constrainResolution_)) {
if (this.trackpadTimeoutId_) {
clearTimeout(this.trackpadTimeoutId_);
} else {