Skip to content

Commit 12f9262

Browse files
committed
Website updates
1 parent f886e13 commit 12f9262

File tree

7 files changed

+11
-15
lines changed

7 files changed

+11
-15
lines changed

dist/en/main/examples/common.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/events/condition.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

dist/en/main/ol/events/condition.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export const click = function (mapBrowserEvent) {
134134
export const mouseActionButton = function (mapBrowserEvent) {
135135
const originalEvent = mapBrowserEvent.originalEvent;
136136
return (
137-
originalEvent instanceof PointerEvent &&
137+
'pointerId' in originalEvent &&
138138
originalEvent.button == 0 &&
139139
!(WEBKIT && MAC && originalEvent.ctrlKey)
140140
);
@@ -283,9 +283,7 @@ export const targetNotEditable = function (mapBrowserEvent) {
283283
export const mouseOnly = function (mapBrowserEvent) {
284284
const pointerEvent = mapBrowserEvent.originalEvent;
285285
// see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType
286-
return (
287-
pointerEvent instanceof PointerEvent && pointerEvent.pointerType == 'mouse'
288-
);
286+
return 'pointerId' in pointerEvent && pointerEvent.pointerType == 'mouse';
289287
};
290288

291289
/**
@@ -298,9 +296,7 @@ export const mouseOnly = function (mapBrowserEvent) {
298296
export const touchOnly = function (mapBrowserEvent) {
299297
const pointerEvt = mapBrowserEvent.originalEvent;
300298
// see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType
301-
return (
302-
pointerEvt instanceof PointerEvent && pointerEvt.pointerType === 'touch'
303-
);
299+
return 'pointerId' in pointerEvt && pointerEvt.pointerType === 'touch';
304300
};
305301

306302
/**
@@ -313,7 +309,7 @@ export const touchOnly = function (mapBrowserEvent) {
313309
export const penOnly = function (mapBrowserEvent) {
314310
const pointerEvt = mapBrowserEvent.originalEvent;
315311
// see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType
316-
return pointerEvt instanceof PointerEvent && pointerEvt.pointerType === 'pen';
312+
return 'pointerId' in pointerEvt && pointerEvt.pointerType === 'pen';
317313
};
318314

319315
/**
@@ -328,7 +324,7 @@ export const penOnly = function (mapBrowserEvent) {
328324
export const primaryAction = function (mapBrowserEvent) {
329325
const pointerEvent = mapBrowserEvent.originalEvent;
330326
return (
331-
pointerEvent instanceof PointerEvent &&
327+
'pointerId' in pointerEvent &&
332328
pointerEvent.isPrimary &&
333329
pointerEvent.button === 0
334330
);

dist/main.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)