Named exports from ol/has

This commit is contained in:
Tim Schaub
2018-02-05 10:10:17 -07:00
parent 348afc4e44
commit 9cfee0f40b
26 changed files with 222 additions and 185 deletions

View File

@@ -6,7 +6,7 @@ import ViewHint from '../ViewHint.js';
import condition from '../events/condition.js';
import {easeOut} from '../easing.js';
import EventType from '../events/EventType.js';
import _ol_has_ from '../has.js';
import {DEVICE_PIXEL_RATIO, FIREFOX, SAFARI} from '../has.js';
import Interaction from '../interaction/Interaction.js';
import {clamp} from '../math.js';
@@ -156,16 +156,16 @@ MouseWheelZoom.handleEvent = function(mapBrowserEvent) {
let delta;
if (mapBrowserEvent.type == EventType.WHEEL) {
delta = wheelEvent.deltaY;
if (_ol_has_.FIREFOX &&
if (FIREFOX &&
wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {
delta /= _ol_has_.DEVICE_PIXEL_RATIO;
delta /= DEVICE_PIXEL_RATIO;
}
if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {
delta *= 40;
}
} else if (mapBrowserEvent.type == EventType.MOUSEWHEEL) {
delta = -wheelEvent.wheelDeltaY;
if (_ol_has_.SAFARI) {
if (SAFARI) {
delta /= 3;
}
}