diff --git a/src/ol/index.js b/src/ol/index.js index 746e7f26f0..7fedbfe2cb 100644 --- a/src/ol/index.js +++ b/src/ol/index.js @@ -62,13 +62,6 @@ export var ENABLE_WEBGL = true; export var DEBUG_WEBGL = true; -/** - * TODO: move this to MouseWheelZoom.js - * @type {number} Maximum mouse wheel delta. - */ -export var MOUSEWHEELZOOM_MAXDELTA = 1; - - /** * TODO: move this to OverviewMap.js * @type {number} Maximum width and/or height extent ratio that determines @@ -234,7 +227,6 @@ export default { ENABLE_RASTER_REPROJECTION: ENABLE_RASTER_REPROJECTION, ENABLE_WEBGL: ENABLE_WEBGL, DEBUG_WEBGL: DEBUG_WEBGL, - MOUSEWHEELZOOM_MAXDELTA: MOUSEWHEELZOOM_MAXDELTA, OVERVIEWMAP_MAX_RATIO: OVERVIEWMAP_MAX_RATIO, OVERVIEWMAP_MIN_RATIO: OVERVIEWMAP_MIN_RATIO, RASTER_REPROJECTION_MAX_SUBDIVISION: RASTER_REPROJECTION_MAX_SUBDIVISION, diff --git a/src/ol/interaction/MouseWheelZoom.js b/src/ol/interaction/MouseWheelZoom.js index 16e16dc7cc..18d93663cc 100644 --- a/src/ol/interaction/MouseWheelZoom.js +++ b/src/ol/interaction/MouseWheelZoom.js @@ -1,7 +1,7 @@ /** * @module ol/interaction/MouseWheelZoom */ -import {MOUSEWHEELZOOM_MAXDELTA, inherits} from '../index.js'; +import {inherits} from '../index.js'; import _ol_ViewHint_ from '../ViewHint.js'; import _ol_easing_ from '../easing.js'; import _ol_events_EventType_ from '../events/EventType.js'; @@ -9,6 +9,13 @@ import _ol_has_ from '../has.js'; import _ol_interaction_Interaction_ from '../interaction/Interaction.js'; import _ol_math_ from '../math.js'; + +/** + * @type {number} Maximum mouse wheel delta. + */ +var MAX_DELTA = 1; + + /** * @classdesc * Allows the user to zoom the map by scrolling the mouse wheel. @@ -252,7 +259,7 @@ _ol_interaction_MouseWheelZoom_.prototype.handleWheelZoom_ = function(map) { if (view.getAnimating()) { view.cancelAnimations(); } - var maxDelta = MOUSEWHEELZOOM_MAXDELTA; + var maxDelta = MAX_DELTA; var delta = _ol_math_.clamp(this.delta_, -maxDelta, maxDelta); _ol_interaction_Interaction_.zoomByDelta(view, -delta, this.lastAnchor_, this.duration_);