Use pepjs instead of our own pointerevent polyfill

This commit is contained in:
ahocevar
2019-08-28 21:48:06 +02:00
parent aca4a39863
commit 74e8e013cf
27 changed files with 197 additions and 2430 deletions

View File

@@ -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;
});