Use pepjs instead of our own pointerevent polyfill
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import PointerEvent from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import Event from '../../../../src/ol/events/Event.js';
|
||||
import PointerInteraction from '../../../../src/ol/interaction/Pointer.js';
|
||||
|
||||
describe('ol.interaction.Pointer', function() {
|
||||
@@ -12,12 +12,12 @@ describe('ol.interaction.Pointer', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
const type = 'pointerdown';
|
||||
const pointerEvent = new PointerEvent(type, {
|
||||
type: type,
|
||||
preventDefault: function() {
|
||||
defaultPrevented = true;
|
||||
}
|
||||
});
|
||||
const pointerEvent = new Event();
|
||||
pointerEvent.type = type;
|
||||
pointerEvent.pointerId = 0;
|
||||
pointerEvent.preventDefault = function() {
|
||||
defaultPrevented = true;
|
||||
};
|
||||
event = new MapBrowserPointerEvent(type, new Map(), pointerEvent);
|
||||
defaultPrevented = false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user