Get rid of MapBrowserPointerEvent
This commit is contained in:
@@ -170,7 +170,7 @@ class DragBox extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);
|
||||
@@ -186,7 +186,7 @@ class DragBox extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
@@ -213,7 +213,7 @@ class DragBox extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
|
||||
@@ -87,7 +87,7 @@ class DragPan extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
if (!this.panning_) {
|
||||
@@ -123,7 +123,7 @@ class DragPan extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
@@ -163,7 +163,7 @@ class DragPan extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
@@ -192,7 +192,7 @@ class DragPan extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Browser event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Browser event.
|
||||
* @return {boolean} Combined condition result.
|
||||
*/
|
||||
function defaultCondition(mapBrowserEvent) {
|
||||
|
||||
@@ -60,7 +60,7 @@ class DragRotate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
if (!mouseOnly(mapBrowserEvent)) {
|
||||
@@ -84,7 +84,7 @@ class DragRotate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
@@ -100,7 +100,7 @@ class DragRotate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
|
||||
@@ -66,7 +66,7 @@ class DragRotateAndZoom extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
if (!mouseOnly(mapBrowserEvent)) {
|
||||
@@ -97,7 +97,7 @@ class DragRotateAndZoom extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
@@ -115,7 +115,7 @@ class DragRotateAndZoom extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
|
||||
@@ -8,8 +8,8 @@ import Feature from '../Feature.js';
|
||||
import GeometryType from '../geom/GeometryType.js';
|
||||
import InteractionProperty from './Property.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import MapBrowserEvent from '../MapBrowserEvent.js';
|
||||
import MapBrowserEventType from '../MapBrowserEventType.js';
|
||||
import MapBrowserPointerEvent from '../MapBrowserPointerEvent.js';
|
||||
import MultiLineString from '../geom/MultiLineString.js';
|
||||
import MultiPoint from '../geom/MultiPoint.js';
|
||||
import MultiPolygon from '../geom/MultiPolygon.js';
|
||||
@@ -493,7 +493,7 @@ class Draw extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handles the {@link module:ol/MapBrowserEvent map browser event} and may actually draw or finish the drawing.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Map browser event.
|
||||
* @param {import("../MapBrowserEvent.js").default} event Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @api
|
||||
*/
|
||||
@@ -545,7 +545,7 @@ class Draw extends PointerInteraction {
|
||||
event.preventDefault();
|
||||
}
|
||||
} else if (
|
||||
event.pointerEvent.pointerType == 'mouse' ||
|
||||
event.originalEvent.pointerType == 'mouse' ||
|
||||
(event.type === MapBrowserEventType.POINTERDRAG &&
|
||||
this.downTimeout_ === undefined)
|
||||
) {
|
||||
@@ -560,7 +560,7 @@ class Draw extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} event Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(event) {
|
||||
@@ -577,10 +577,10 @@ class Draw extends PointerInteraction {
|
||||
this.downTimeout_ = setTimeout(
|
||||
function () {
|
||||
this.handlePointerMove_(
|
||||
new MapBrowserPointerEvent(
|
||||
new MapBrowserEvent(
|
||||
MapBrowserEventType.POINTERMOVE,
|
||||
event.map,
|
||||
event.pointerEvent,
|
||||
event.originalEvent,
|
||||
false,
|
||||
event.frameState
|
||||
)
|
||||
@@ -598,7 +598,7 @@ class Draw extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} event Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(event) {
|
||||
|
||||
@@ -276,11 +276,11 @@ class Extent extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
*/
|
||||
handleEvent(mapBrowserEvent) {
|
||||
if (!mapBrowserEvent.pointerEvent) {
|
||||
if (!mapBrowserEvent.originalEvent) {
|
||||
return true;
|
||||
}
|
||||
//display pointer (if not dragging)
|
||||
@@ -298,7 +298,7 @@ class Extent extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
@@ -359,7 +359,7 @@ class Extent extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
if (this.pointerHandler_) {
|
||||
@@ -371,7 +371,7 @@ class Extent extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
|
||||
@@ -130,10 +130,10 @@ export class ModifyEvent extends Event {
|
||||
* @param {ModifyEventType} type Type.
|
||||
* @param {Collection<Feature>} features
|
||||
* The features modified.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserPointerEvent
|
||||
* Associated {@link module:ol/MapBrowserPointerEvent}.
|
||||
* @param {import("../MapBrowserEvent.js").default} MapBrowserEvent
|
||||
* Associated {@link module:ol/MapBrowserEvent}.
|
||||
*/
|
||||
constructor(type, features, mapBrowserPointerEvent) {
|
||||
constructor(type, features, MapBrowserEvent) {
|
||||
super(type);
|
||||
|
||||
/**
|
||||
@@ -148,7 +148,7 @@ export class ModifyEvent extends Event {
|
||||
* @type {import("../MapBrowserEvent.js").default}
|
||||
* @api
|
||||
*/
|
||||
this.mapBrowserEvent = mapBrowserPointerEvent;
|
||||
this.mapBrowserEvent = MapBrowserEvent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ class Modify extends PointerInteraction {
|
||||
);
|
||||
|
||||
/**
|
||||
* @type {import("../MapBrowserPointerEvent.js").default}
|
||||
* @type {import("../MapBrowserEvent.js").default}
|
||||
* @private
|
||||
*/
|
||||
this.lastPointerEvent_ = null;
|
||||
@@ -376,7 +376,7 @@ class Modify extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Map browser event
|
||||
* @param {import("../MapBrowserEvent.js").default} evt Map browser event
|
||||
* @private
|
||||
*/
|
||||
willModifyFeatures_(evt) {
|
||||
@@ -743,11 +743,11 @@ class Modify extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handles the {@link module:ol/MapBrowserEvent map browser event} and may modify the geometry.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
*/
|
||||
handleEvent(mapBrowserEvent) {
|
||||
if (!mapBrowserEvent.pointerEvent) {
|
||||
if (!mapBrowserEvent.originalEvent) {
|
||||
return true;
|
||||
}
|
||||
this.lastPointerEvent_ = mapBrowserEvent;
|
||||
@@ -780,7 +780,7 @@ class Modify extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} evt Event.
|
||||
*/
|
||||
handleDragEvent(evt) {
|
||||
this.ignoreNextSingleClick_ = false;
|
||||
@@ -874,7 +874,7 @@ class Modify extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} evt Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(evt) {
|
||||
@@ -977,7 +977,7 @@ class Modify extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} evt Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(evt) {
|
||||
|
||||
@@ -74,7 +74,7 @@ class PinchRotate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
let rotationDelta = 0.0;
|
||||
@@ -122,7 +122,7 @@ class PinchRotate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
@@ -138,7 +138,7 @@ class PinchRotate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
|
||||
@@ -59,7 +59,7 @@ class PinchZoom extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
let scaleDelta = 1.0;
|
||||
@@ -98,7 +98,7 @@ class PinchZoom extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
@@ -115,7 +115,7 @@ class PinchZoom extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
|
||||
@@ -7,10 +7,10 @@ import {getValues} from '../obj.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {function(import("../MapBrowserPointerEvent.js").default):boolean} [handleDownEvent]
|
||||
* @property {function(import("../MapBrowserEvent.js").default):boolean} [handleDownEvent]
|
||||
* Function handling "down" events. If the function returns `true` then a drag
|
||||
* sequence is started.
|
||||
* @property {function(import("../MapBrowserPointerEvent.js").default)} [handleDragEvent]
|
||||
* @property {function(import("../MapBrowserEvent.js").default)} [handleDragEvent]
|
||||
* Function handling "drag" events. This function is called on "move" events
|
||||
* during a drag sequence.
|
||||
* @property {function(import("../MapBrowserEvent.js").default):boolean} [handleEvent]
|
||||
@@ -18,13 +18,13 @@ import {getValues} from '../obj.js';
|
||||
* dispatched to the map. The function may return `false` to prevent the
|
||||
* propagation of the event to other interactions in the map's interactions
|
||||
* chain.
|
||||
* @property {function(import("../MapBrowserPointerEvent.js").default)} [handleMoveEvent]
|
||||
* @property {function(import("../MapBrowserEvent.js").default)} [handleMoveEvent]
|
||||
* Function handling "move" events. This function is called on "move" events.
|
||||
* This functions is also called during a drag sequence, so during a drag
|
||||
* sequence both the `handleDragEvent` function and this function are called.
|
||||
* If `handleDownEvent` is defined and it returns true this function will not
|
||||
* be called during a drag sequence.
|
||||
* @property {function(import("../MapBrowserPointerEvent.js").default):boolean} [handleUpEvent]
|
||||
* @property {function(import("../MapBrowserEvent.js").default):boolean} [handleUpEvent]
|
||||
* Function handling "up" events. If the function returns `false` then the
|
||||
* current drag sequence is stopped.
|
||||
* @property {function(boolean):boolean} [stopDown]
|
||||
@@ -105,7 +105,7 @@ class PointerInteraction extends Interaction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
* @protected
|
||||
*/
|
||||
@@ -115,7 +115,7 @@ class PointerInteraction extends Interaction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @protected
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {}
|
||||
@@ -124,12 +124,12 @@ class PointerInteraction extends Interaction {
|
||||
* Handles the {@link module:ol/MapBrowserEvent map browser event} and may call into
|
||||
* other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are
|
||||
* detected.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @api
|
||||
*/
|
||||
handleEvent(mapBrowserEvent) {
|
||||
if (!mapBrowserEvent.pointerEvent) {
|
||||
if (!mapBrowserEvent.originalEvent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -159,14 +159,14 @@ class PointerInteraction extends Interaction {
|
||||
|
||||
/**
|
||||
* Handle pointer move events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @protected
|
||||
*/
|
||||
handleMoveEvent(mapBrowserEvent) {}
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
* @protected
|
||||
*/
|
||||
@@ -185,12 +185,12 @@ class PointerInteraction extends Interaction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @private
|
||||
*/
|
||||
updateTrackedPointers_(mapBrowserEvent) {
|
||||
if (isPointerDraggingEvent(mapBrowserEvent)) {
|
||||
const event = mapBrowserEvent.pointerEvent;
|
||||
const event = mapBrowserEvent.originalEvent;
|
||||
|
||||
const id = event.pointerId.toString();
|
||||
if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {
|
||||
@@ -222,7 +222,7 @@ export function centroid(pointerEvents) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} Whether the event is a pointerdown, pointerdrag
|
||||
* or pointerup event.
|
||||
*/
|
||||
|
||||
@@ -259,7 +259,7 @@ class Snap extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Map browser event.
|
||||
* @param {import("../MapBrowserEvent.js").default} evt Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
*/
|
||||
handleEvent(evt) {
|
||||
@@ -307,7 +307,7 @@ class Snap extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} evt Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(evt) {
|
||||
|
||||
@@ -189,7 +189,7 @@ class Translate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} event Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(event) {
|
||||
@@ -217,7 +217,7 @@ class Translate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} event Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(event) {
|
||||
@@ -245,7 +245,7 @@ class Translate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} event Event.
|
||||
*/
|
||||
handleDragEvent(event) {
|
||||
if (this.lastCoordinate_) {
|
||||
@@ -277,7 +277,7 @@ class Translate extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handle pointer move events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @param {import("../MapBrowserEvent.js").default} event Event.
|
||||
*/
|
||||
handleMoveEvent(event) {
|
||||
const elem = event.map.getViewport();
|
||||
|
||||
Reference in New Issue
Block a user