Remove all inheritDoc tags from src/ol/interaction
This commit is contained in:
@@ -185,7 +185,10 @@ class DragAndDrop extends Interaction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Activate or deactivate the interaction.
|
||||
* @param {boolean} active Active.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
setActive(active) {
|
||||
if (!this.getActive() && active) {
|
||||
@@ -198,7 +201,10 @@ class DragAndDrop extends Interaction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Remove the interaction from its current map and attach it to the new map.
|
||||
* Subclasses may set up event handlers to get notified about changes to
|
||||
* the map here.
|
||||
* @param {import("../PluggableMap.js").default} map Map.
|
||||
*/
|
||||
setMap(map) {
|
||||
this.unregisterListeners_();
|
||||
|
||||
@@ -181,7 +181,8 @@ class DragBox extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);
|
||||
@@ -191,7 +192,9 @@ class DragBox extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
this.box_.setMap(null);
|
||||
@@ -205,7 +208,9 @@ class DragBox extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
if (this.condition_(mapBrowserEvent)) {
|
||||
|
||||
@@ -86,7 +86,8 @@ class DragPan extends PointerInteraction {
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
if (!this.panning_) {
|
||||
@@ -121,7 +122,9 @@ class DragPan extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
const map = mapBrowserEvent.map;
|
||||
@@ -159,7 +162,9 @@ class DragPan extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
if (this.targetPointers.length > 0 && this.conditionInternal_(mapBrowserEvent)) {
|
||||
|
||||
@@ -60,7 +60,8 @@ class DragRotate extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
if (!mouseOnly(mapBrowserEvent)) {
|
||||
@@ -85,7 +86,9 @@ class DragRotate extends PointerInteraction {
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
if (!mouseOnly(mapBrowserEvent)) {
|
||||
@@ -100,7 +103,9 @@ class DragRotate extends PointerInteraction {
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
if (!mouseOnly(mapBrowserEvent)) {
|
||||
|
||||
@@ -70,7 +70,8 @@ class DragRotateAndZoom extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
if (!mouseOnly(mapBrowserEvent)) {
|
||||
@@ -100,7 +101,9 @@ class DragRotateAndZoom extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
if (!mouseOnly(mapBrowserEvent)) {
|
||||
@@ -116,7 +119,9 @@ class DragRotateAndZoom extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
if (!mouseOnly(mapBrowserEvent)) {
|
||||
|
||||
@@ -465,7 +465,10 @@ class Draw extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Remove the interaction from its current map and attach it to the new map.
|
||||
* Subclasses may set up event handlers to get notified about changes to
|
||||
* the map here.
|
||||
* @param {import("../PluggableMap.js").default} map Map.
|
||||
*/
|
||||
setMap(map) {
|
||||
super.setMap(map);
|
||||
@@ -483,7 +486,8 @@ class Draw extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handles the {@link module:ol/MapBrowserEvent map browser event} and may actually draw or finish the drawing.
|
||||
* @override
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @api
|
||||
*/
|
||||
handleEvent(event) {
|
||||
@@ -520,7 +524,7 @@ class Draw extends PointerInteraction {
|
||||
pass = event.type === MapBrowserEventType.POINTERMOVE;
|
||||
if (pass && this.freehand_) {
|
||||
pass = this.handlePointerMove_(event);
|
||||
} else if (/** @type {MapBrowserPointerEvent} */ (event).pointerEvent.pointerType == 'mouse' ||
|
||||
} else if (event.pointerEvent.pointerType == 'mouse' ||
|
||||
(event.type === MapBrowserEventType.POINTERDRAG && this.downTimeout_ === undefined)) {
|
||||
this.handlePointerMove_(event);
|
||||
}
|
||||
@@ -532,7 +536,9 @@ class Draw extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(event) {
|
||||
this.shouldHandle_ = !this.freehand_;
|
||||
@@ -559,7 +565,9 @@ class Draw extends PointerInteraction {
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(event) {
|
||||
let pass = true;
|
||||
|
||||
@@ -273,10 +273,11 @@ class Extent extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
*/
|
||||
handleEvent(mapBrowserEvent) {
|
||||
if (!(/** @type {import("../MapBrowserPointerEvent.js").default} */ (mapBrowserEvent).pointerEvent)) {
|
||||
if (!mapBrowserEvent.pointerEvent) {
|
||||
return true;
|
||||
}
|
||||
//display pointer (if not dragging)
|
||||
@@ -290,7 +291,9 @@ class Extent extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
const pixel = mapBrowserEvent.pixel;
|
||||
@@ -347,7 +350,8 @@ class Extent extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
if (this.pointerHandler_) {
|
||||
@@ -355,11 +359,12 @@ class Extent extends PointerInteraction {
|
||||
this.setExtent(this.pointerHandler_(pixelCoordinate));
|
||||
this.createOrUpdatePointerFeature_(pixelCoordinate);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
this.pointerHandler_ = null;
|
||||
@@ -372,7 +377,10 @@ class Extent extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Remove the interaction from its current map and attach it to the new map.
|
||||
* Subclasses may set up event handlers to get notified about changes to
|
||||
* the map here.
|
||||
* @param {import("../PluggableMap.js").default} map Map.
|
||||
*/
|
||||
setMap(map) {
|
||||
this.extentOverlay_.setMap(map);
|
||||
|
||||
@@ -404,7 +404,10 @@ class Modify extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Activate or deactivate the interaction.
|
||||
* @param {boolean} active Active.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
setActive(active) {
|
||||
if (this.vertexFeature_ && !active) {
|
||||
@@ -415,7 +418,10 @@ class Modify extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Remove the interaction from its current map and attach it to the new map.
|
||||
* Subclasses may set up event handlers to get notified about changes to
|
||||
* the map here.
|
||||
* @param {import("../PluggableMap.js").default} map Map.
|
||||
*/
|
||||
setMap(map) {
|
||||
this.overlay_.setMap(map);
|
||||
@@ -702,10 +708,11 @@ class Modify extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Handles the {@link module:ol/MapBrowserEvent map browser event} and may modify the geometry.
|
||||
* @override
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
*/
|
||||
handleEvent(mapBrowserEvent) {
|
||||
if (!(/** @type {import("../MapBrowserPointerEvent.js").default} */ (mapBrowserEvent).pointerEvent)) {
|
||||
if (!mapBrowserEvent.pointerEvent) {
|
||||
return true;
|
||||
}
|
||||
this.lastPointerEvent_ = mapBrowserEvent;
|
||||
@@ -732,7 +739,8 @@ class Modify extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Event.
|
||||
*/
|
||||
handleDragEvent(evt) {
|
||||
this.ignoreNextSingleClick_ = false;
|
||||
@@ -818,7 +826,9 @@ class Modify extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(evt) {
|
||||
if (!this.condition_(evt)) {
|
||||
@@ -899,7 +909,9 @@ class Modify extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(evt) {
|
||||
for (let i = this.dragSegments_.length - 1; i >= 0; --i) {
|
||||
|
||||
@@ -162,7 +162,8 @@ class MouseWheelZoom extends Interaction {
|
||||
/**
|
||||
* Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually
|
||||
* zooms the map.
|
||||
* @override
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
*/
|
||||
handleEvent(mapBrowserEvent) {
|
||||
if (!this.conditionInternal_(mapBrowserEvent)) {
|
||||
|
||||
@@ -75,7 +75,8 @@ class PinchRotate extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
let rotationDelta = 0.0;
|
||||
@@ -122,7 +123,9 @@ class PinchRotate extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
if (this.targetPointers.length < 2) {
|
||||
@@ -136,7 +139,9 @@ class PinchRotate extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
if (this.targetPointers.length >= 2) {
|
||||
|
||||
@@ -60,7 +60,8 @@ class PinchZoom extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
*/
|
||||
handleDragEvent(mapBrowserEvent) {
|
||||
let scaleDelta = 1.0;
|
||||
@@ -99,7 +100,9 @@ class PinchZoom extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(mapBrowserEvent) {
|
||||
if (this.targetPointers.length < 2) {
|
||||
@@ -114,7 +117,9 @@ class PinchZoom extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(mapBrowserEvent) {
|
||||
if (this.targetPointers.length >= 2) {
|
||||
|
||||
@@ -126,11 +126,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.
|
||||
* @override
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @api
|
||||
*/
|
||||
handleEvent(mapBrowserEvent) {
|
||||
if (!(/** @type {import("../MapBrowserPointerEvent.js").default} */ (mapBrowserEvent).pointerEvent)) {
|
||||
if (!mapBrowserEvent.pointerEvent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -317,7 +317,6 @@ class Select extends Interaction {
|
||||
* Remove the interaction from its current map, if any, and attach it to a new
|
||||
* map, if any. Pass `null` to just remove the interaction from the current map.
|
||||
* @param {import("../PluggableMap.js").default} map Map.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
setMap(map) {
|
||||
|
||||
@@ -243,7 +243,8 @@ class Snap extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
*/
|
||||
handleEvent(evt) {
|
||||
const result = this.snapTo(evt.pixel, evt.coordinate, evt.map);
|
||||
@@ -289,7 +290,9 @@ class Snap extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} evt Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(evt) {
|
||||
const featuresToUpdate = getValues(this.pendingFeatures_);
|
||||
@@ -331,7 +334,10 @@ class Snap extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Remove the interaction from its current map and attach it to the new map.
|
||||
* Subclasses may set up event handlers to get notified about changes to
|
||||
* the map here.
|
||||
* @param {import("../PluggableMap.js").default} map Map.
|
||||
*/
|
||||
setMap(map) {
|
||||
const currentMap = this.getMap();
|
||||
|
||||
@@ -193,7 +193,9 @@ class Translate extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer down events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleDownEvent(event) {
|
||||
this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map);
|
||||
@@ -214,7 +216,9 @@ class Translate extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer up events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
* @return {boolean} If the event was consumed.
|
||||
*/
|
||||
handleUpEvent(event) {
|
||||
if (this.lastCoordinate_) {
|
||||
@@ -235,7 +239,8 @@ class Translate extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer drag events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
*/
|
||||
handleDragEvent(event) {
|
||||
if (this.lastCoordinate_) {
|
||||
@@ -260,7 +265,8 @@ class Translate extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Handle pointer move events.
|
||||
* @param {import("../MapBrowserPointerEvent.js").default} event Event.
|
||||
*/
|
||||
handleMoveEvent(event) {
|
||||
const elem = event.map.getViewport();
|
||||
@@ -318,7 +324,10 @@ class Translate extends PointerInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Remove the interaction from its current map and attach it to the new map.
|
||||
* Subclasses may set up event handlers to get notified about changes to
|
||||
* the map here.
|
||||
* @param {import("../PluggableMap.js").default} map Map.
|
||||
*/
|
||||
setMap(map) {
|
||||
const oldMap = this.getMap();
|
||||
|
||||
Reference in New Issue
Block a user