Ensure changes to zoom wheel handling pass tests.
This commit is contained in:
committed by
Andreas Hocevar
parent
54bae0168f
commit
77658e5750
@@ -4,8 +4,7 @@
|
||||
import {always, focus} from '../events/condition.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import {DEVICE_PIXEL_RATIO, FIREFOX} from '../has.js';
|
||||
import Interaction, {zoomByDelta} from './Interaction.js';
|
||||
import {clamp} from '../math.js';
|
||||
import Interaction from './Interaction.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,8 +2,8 @@ import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEvent from '../../../../src/ol/MapBrowserEvent.js';
|
||||
import View from '../../../../src/ol/View.js';
|
||||
import Event from '../../../../src/ol/events/Event.js';
|
||||
import {DEVICE_PIXEL_RATIO, FIREFOX} from '../../../../src/ol/has.js';
|
||||
import MouseWheelZoom, {Mode} from '../../../../src/ol/interaction/MouseWheelZoom.js';
|
||||
import {DEVICE_PIXEL_RATIO, FIREFOX, SAFARI} from '../../../../src/ol/has.js';
|
||||
import MouseWheelZoom from '../../../../src/ol/interaction/MouseWheelZoom.js';
|
||||
|
||||
|
||||
describe('ol.interaction.MouseWheelZoom', function() {
|
||||
@@ -66,7 +66,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
||||
if (FIREFOX) {
|
||||
it('works on Firefox in DOM_DELTA_PIXEL mode (trackpad)', function(done) {
|
||||
map.once('postrender', function() {
|
||||
expect(interaction.mode_).to.be(Mode.TRACKPAD);
|
||||
expect(interaction.lastDelta_).to.be(1);
|
||||
done();
|
||||
});
|
||||
const event = new MapBrowserEvent('wheel', map, {
|
||||
@@ -84,7 +84,7 @@ describe('ol.interaction.MouseWheelZoom', function() {
|
||||
if (!FIREFOX) {
|
||||
it('works in DOM_DELTA_PIXEL mode (trackpad)', function(done) {
|
||||
map.once('postrender', function() {
|
||||
expect(interaction.mode_).to.be(Mode.TRACKPAD);
|
||||
expect(interaction.lastDelta_).to.be(1);
|
||||
done();
|
||||
});
|
||||
const event = new MapBrowserEvent('wheel', map, {
|
||||
|
||||
Reference in New Issue
Block a user