Module type for ol/MapBrowserEvent
This commit is contained in:
@@ -65,7 +65,7 @@ inherits(app.Drag, PointerInteraction);
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} evt Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Map browser event.
|
||||
* @return {boolean} `true` to start the drag sequence.
|
||||
*/
|
||||
app.Drag.prototype.handleDownEvent = function(evt) {
|
||||
@@ -86,7 +86,7 @@ app.Drag.prototype.handleDownEvent = function(evt) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} evt Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Map browser event.
|
||||
*/
|
||||
app.Drag.prototype.handleDragEvent = function(evt) {
|
||||
const deltaX = evt.coordinate[0] - this.coordinate_[0];
|
||||
@@ -101,7 +101,7 @@ app.Drag.prototype.handleDragEvent = function(evt) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} evt Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Event.
|
||||
*/
|
||||
app.Drag.prototype.handleMoveEvent = function(evt) {
|
||||
if (this.cursor_) {
|
||||
|
||||
@@ -93,7 +93,7 @@ const continueLineMsg = 'Click to continue drawing the line';
|
||||
|
||||
/**
|
||||
* Handle pointer move.
|
||||
* @param {ol.MapBrowserEvent} evt The event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt The event.
|
||||
*/
|
||||
const pointerMoveHandler = function(evt) {
|
||||
if (evt.dragging) {
|
||||
|
||||
@@ -74,7 +74,7 @@ oli.DragBoxEvent.prototype.coordinate;
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
*/
|
||||
oli.DragBoxEvent.prototype.mapBrowserEvent;
|
||||
|
||||
@@ -115,7 +115,7 @@ oli.ModifyEvent.prototype.features;
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
*/
|
||||
oli.ModifyEvent.prototype.mapBrowserEvent;
|
||||
|
||||
@@ -211,7 +211,7 @@ oli.SelectEvent.prototype.selected;
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
*/
|
||||
oli.SelectEvent.prototype.mapBrowserEvent;
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ olx.interaction.DragBoxOptions.prototype.className;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.always}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
@@ -110,7 +110,7 @@ olx.interaction.DragBoxOptions.prototype.minArea;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes a {@link ol.MapBrowserEvent} and two
|
||||
* A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
|
||||
* {@link ol.Pixel}s to indicate whether a `boxend` event should be fired.
|
||||
* Default is `true` if the area of the box is bigger than the `minArea` option.
|
||||
* @type {ol.DragBoxEndConditionType|undefined}
|
||||
@@ -127,7 +127,7 @@ olx.interaction.DragPanOptions;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.noModifierKeys}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
@@ -152,7 +152,7 @@ olx.interaction.DragRotateAndZoomOptions;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.shiftKeyOnly}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
@@ -177,7 +177,7 @@ olx.interaction.DragRotateOptions;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.altShiftKeysOnly}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
@@ -212,7 +212,7 @@ olx.interaction.DragZoomOptions.prototype.className;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.shiftKeyOnly}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
@@ -340,7 +340,7 @@ olx.interaction.DrawOptions.prototype.minPoints;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether the drawing can be finished.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
* @api
|
||||
@@ -373,7 +373,7 @@ olx.interaction.DrawOptions.prototype.geometryName;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a
|
||||
* vertex or deactivates freehand drawing.
|
||||
@@ -395,7 +395,7 @@ olx.interaction.DrawOptions.prototype.freehand;
|
||||
|
||||
/**
|
||||
* Condition that activates freehand drawing for lines and polygons. This
|
||||
* function takes an {@link ol.MapBrowserEvent} and returns a boolean to
|
||||
* function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean to
|
||||
* indicate whether that event should be handled. The default is
|
||||
* {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key
|
||||
* activates freehand drawing.
|
||||
@@ -513,7 +513,7 @@ olx.interaction.KeyboardPanOptions;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.noModifierKeys} and
|
||||
* {@link ol.events.condition.targetNotEditable}.
|
||||
@@ -556,7 +556,7 @@ olx.interaction.KeyboardZoomOptions.prototype.duration;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.targetNotEditable}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
@@ -589,7 +589,7 @@ olx.interaction.ModifyOptions;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event will be considered to add or move a vertex
|
||||
* to the sketch.
|
||||
* Default is {@link ol.events.condition.primaryAction}.
|
||||
@@ -600,7 +600,7 @@ olx.interaction.ModifyOptions.prototype.condition;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* By default, {@link ol.events.condition.singleClick} with
|
||||
* {@link ol.events.condition.altKeyOnly} results in a vertex deletion.
|
||||
@@ -611,7 +611,7 @@ olx.interaction.ModifyOptions.prototype.deleteCondition;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether a new vertex can be added to the sketch features.
|
||||
* Default is {@link ol.events.condition.always}
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
@@ -675,7 +675,7 @@ olx.interaction.MouseWheelZoomOptions;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled. Default is {@link ol.events.condition.always}.
|
||||
* @type {ol.EventsConditionType|undefined}
|
||||
* @api
|
||||
@@ -769,7 +769,7 @@ olx.interaction.PinchZoomOptions.prototype.constrainResolution;
|
||||
/**
|
||||
* @typedef {{handleDownEvent: (function(ol.MapBrowserPointerEvent):boolean|undefined),
|
||||
* handleDragEvent: (function(ol.MapBrowserPointerEvent)|undefined),
|
||||
* handleEvent: (function(ol.MapBrowserEvent):boolean|undefined),
|
||||
* handleEvent: (function(module:ol/MapBrowserEvent~MapBrowserEvent):boolean|undefined),
|
||||
* handleMoveEvent: (function(ol.MapBrowserPointerEvent)|undefined),
|
||||
* handleUpEvent: (function(ol.MapBrowserPointerEvent):boolean|undefined)}}
|
||||
*/
|
||||
@@ -799,7 +799,7 @@ olx.interaction.PointerOptions.prototype.handleDragEvent;
|
||||
* 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.
|
||||
* @type {(function(ol.MapBrowserEvent):boolean|undefined)}
|
||||
* @type {(function(module:ol/MapBrowserEvent~MapBrowserEvent):boolean|undefined)}
|
||||
* @api
|
||||
*/
|
||||
olx.interaction.PointerOptions.prototype.handleEvent;
|
||||
@@ -841,7 +841,7 @@ olx.interaction.SelectOptions;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* By default, this is {@link ol.events.condition.never}. Use this if you want
|
||||
* to use different events for add and remove instead of `toggle`.
|
||||
@@ -852,7 +852,7 @@ olx.interaction.SelectOptions.prototype.addCondition;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* This is the event for the selected features as a whole. By default, this is
|
||||
* {@link ol.events.condition.singleClick}. Clicking on a feature selects that
|
||||
@@ -888,7 +888,7 @@ olx.interaction.SelectOptions.prototype.style;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* By default, this is {@link ol.events.condition.never}. Use this if you want
|
||||
* to use different events for add and remove instead of `toggle`.
|
||||
@@ -899,7 +899,7 @@ olx.interaction.SelectOptions.prototype.removeCondition;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* This is in addition to the `condition` event. By default,
|
||||
* {@link ol.events.condition.shiftKeyOnly}, i.e. pressing `shift` as well as
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
/**
|
||||
* @typedef {Object} interaction_DragBoxOptions
|
||||
* @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragbox`.
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.always}.
|
||||
* @property {number|undefined} minArea The minimum area of the box in pixel, this value is used by the default
|
||||
* `boxEndCondition` function. Default is `64`.
|
||||
* @property {ol.DragBoxEndConditionType|undefined} boxEndCondition A function that takes a {@link ol.MapBrowserEvent} and two
|
||||
* @property {ol.DragBoxEndConditionType|undefined} boxEndCondition A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
|
||||
* {@link ol.Pixel}s to indicate whether a `boxend` event should be fired.
|
||||
* Default is `true` if the area of the box is bigger than the `minArea` option.
|
||||
*/
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_DragPanOptions
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.noModifierKeys}.
|
||||
* @property {ol.Kinetic|undefined} kinetic Kinetic inertia to apply to the pan.
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_DragRotateAndZoomOptions
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.shiftKeyOnly}.
|
||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `400`.
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_DragRotateOptions
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.altShiftKeysOnly}.
|
||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
||||
@@ -63,7 +63,7 @@
|
||||
/**
|
||||
* @typedef {Object} interaction_DragZoomOptions
|
||||
* @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragzoom`.
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.shiftKeyOnly}.
|
||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `200`.
|
||||
@@ -91,12 +91,12 @@
|
||||
* is finished. The default is no restriction.
|
||||
* @property {number|undefined} minPoints The number of points that must be drawn before a polygon ring or line string
|
||||
* can be finished. Default is `3` for polygon rings and `2` for line strings.
|
||||
* @property {ol.EventsConditionType|undefined} finishCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} finishCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether the drawing can be finished.
|
||||
* @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} style Style for sketch features.
|
||||
* @property {ol.DrawGeometryFunctionType|undefined} geometryFunction Function that is called when a geometry's coordinates are updated.
|
||||
* @property {string|undefined} geometryName Geometry name to use for features created by the draw interaction.
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a
|
||||
* vertex or deactivates freehand drawing.
|
||||
@@ -104,7 +104,7 @@
|
||||
* interaction always operate in freehand mode and takes precedence over any
|
||||
* `freehandCondition` option.
|
||||
* @property {ol.EventsConditionType|undefined} freehandCondition Condition that activates freehand drawing for lines and polygons. This
|
||||
* function takes an {@link ol.MapBrowserEvent} and returns a boolean to
|
||||
* function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean to
|
||||
* indicate whether that event should be handled. The default is
|
||||
* {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key
|
||||
* activates freehand drawing.
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_KeyboardPanOptions
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.noModifierKeys} and
|
||||
* {@link ol.events.condition.targetNotEditable}.
|
||||
@@ -155,7 +155,7 @@
|
||||
/**
|
||||
* @typedef {Object} interaction_KeyboardZoomOptions
|
||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `100`.
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol.events.condition.targetNotEditable}.
|
||||
* @property {number|undefined} delta The amount to zoom on each key press. Default is `1`.
|
||||
@@ -164,15 +164,15 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_ModifyOptions
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event will be considered to add or move a vertex
|
||||
* to the sketch.
|
||||
* Default is {@link ol.events.condition.primaryAction}.
|
||||
* @property {ol.EventsConditionType|undefined} deleteCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} deleteCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* By default, {@link ol.events.condition.singleClick} with
|
||||
* {@link ol.events.condition.altKeyOnly} results in a vertex deletion.
|
||||
* @property {ol.EventsConditionType|undefined} insertVertexCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} insertVertexCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether a new vertex can be added to the sketch features.
|
||||
* Default is {@link ol.events.condition.always}
|
||||
* @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_MouseWheelZoomOptions
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled. Default is {@link ol.events.condition.always}.
|
||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
||||
* @property {number|undefined} timeout Mouse wheel timeout duration in milliseconds. Default is `80`.
|
||||
@@ -222,7 +222,7 @@
|
||||
* sequence is started.
|
||||
* @property {(function(ol.MapBrowserPointerEvent)|undefined)} handleDragEvent Function handling "drag" events. This function is called on "move" events
|
||||
* during a drag sequence.
|
||||
* @property {(function(ol.MapBrowserEvent):boolean|undefined)} handleEvent Method called by the map to notify the interaction that a browser event was
|
||||
* @property {(function(module:ol/MapBrowserEvent~MapBrowserEvent):boolean|undefined)} handleEvent Method called by the map to notify the interaction that a browser event was
|
||||
* 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.
|
||||
@@ -236,11 +236,11 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_SelectOptions
|
||||
* @property {ol.EventsConditionType|undefined} addCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} addCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* By default, this is {@link ol.events.condition.never}. Use this if you want
|
||||
* to use different events for add and remove instead of `toggle`.
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* This is the event for the selected features as a whole. By default, this is
|
||||
* {@link ol.events.condition.singleClick}. Clicking on a feature selects that
|
||||
@@ -255,11 +255,11 @@
|
||||
* absent, all visible layers will be considered selectable.
|
||||
* @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined} style Style for the selected features. By default the default edit style is used
|
||||
* (see {@link ol.style}).
|
||||
* @property {ol.EventsConditionType|undefined} removeCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} removeCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* By default, this is {@link ol.events.condition.never}. Use this if you want
|
||||
* to use different events for add and remove instead of `toggle`.
|
||||
* @property {ol.EventsConditionType|undefined} toggleCondition A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
|
||||
* @property {ol.EventsConditionType|undefined} toggleCondition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* This is in addition to the `condition` event. By default,
|
||||
* {@link ol.events.condition.shiftKeyOnly}, i.e. pressing `shift` as well as
|
||||
|
||||
@@ -40,9 +40,9 @@ inherits(DoubleClickZoom, Interaction);
|
||||
|
||||
|
||||
/**
|
||||
* Handles the {@link ol.MapBrowserEvent map browser event} (if it was a
|
||||
* Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a
|
||||
* doubleclick) and eventually zooms the map.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.DoubleClickZoom}
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@ const DragBoxEventType = {
|
||||
*
|
||||
* @param {string} type The event type.
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate The event coordinate.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Originating event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Originating event.
|
||||
* @extends {ol.events.Event}
|
||||
* @constructor
|
||||
* @implements {oli.DragBoxEvent}
|
||||
@@ -62,7 +62,7 @@ const DragBoxEvent = function(type, coordinate, mapBrowserEvent) {
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
* @api
|
||||
*/
|
||||
this.mapBrowserEvent = mapBrowserEvent;
|
||||
@@ -137,7 +137,7 @@ inherits(DragBox, PointerInteraction);
|
||||
/**
|
||||
* The default condition for determining whether the boxend event
|
||||
* should fire.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent The originating MapBrowserEvent
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent The originating MapBrowserEvent
|
||||
* leading to the box end.
|
||||
* @param {module:ol~Pixel} startPixel The starting pixel of the box.
|
||||
* @param {module:ol~Pixel} endPixel The end pixel of the box.
|
||||
@@ -180,7 +180,7 @@ DragBox.prototype.getGeometry = function() {
|
||||
/**
|
||||
* To be overridden by child classes.
|
||||
* FIXME: use constructor option instead of relying on overriding.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @protected
|
||||
*/
|
||||
DragBox.prototype.onBoxEnd = UNDEFINED;
|
||||
|
||||
@@ -394,9 +394,9 @@ Draw.prototype.setMap = function(map) {
|
||||
|
||||
|
||||
/**
|
||||
* Handles the {@link ol.MapBrowserEvent map browser event} and may actually
|
||||
* Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may actually
|
||||
* draw or finish the drawing.
|
||||
* @param {ol.MapBrowserEvent} event Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.Draw}
|
||||
* @api
|
||||
@@ -521,7 +521,7 @@ function handleUpEvent(event) {
|
||||
|
||||
/**
|
||||
* Handle move events.
|
||||
* @param {ol.MapBrowserEvent} event A move event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event A move event.
|
||||
* @return {boolean} Pass the event to other interactions.
|
||||
* @private
|
||||
*/
|
||||
@@ -553,7 +553,7 @@ Draw.prototype.handlePointerMove_ = function(event) {
|
||||
|
||||
/**
|
||||
* Determine if an event is within the snapping tolerance of the start coord.
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @return {boolean} The event is within the snapping tolerance of the start.
|
||||
* @private
|
||||
*/
|
||||
@@ -592,7 +592,7 @@ Draw.prototype.atFinish_ = function(event) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @private
|
||||
*/
|
||||
Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
|
||||
@@ -609,7 +609,7 @@ Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
|
||||
|
||||
/**
|
||||
* Start the drawing.
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @private
|
||||
*/
|
||||
Draw.prototype.startDrawing_ = function(event) {
|
||||
@@ -640,7 +640,7 @@ Draw.prototype.startDrawing_ = function(event) {
|
||||
|
||||
/**
|
||||
* Modify the drawing.
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @private
|
||||
*/
|
||||
Draw.prototype.modifyDrawing_ = function(event) {
|
||||
@@ -687,7 +687,7 @@ Draw.prototype.modifyDrawing_ = function(event) {
|
||||
|
||||
/**
|
||||
* Add a new coordinate to the drawing.
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @private
|
||||
*/
|
||||
Draw.prototype.addToDrawing_ = function(event) {
|
||||
|
||||
@@ -151,7 +151,7 @@ const ExtentInteraction = function(opt_options) {
|
||||
inherits(ExtentInteraction, PointerInteraction);
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Event.
|
||||
* @return {boolean} Propagate event?
|
||||
* @this {ol.interaction.Extent}
|
||||
*/
|
||||
@@ -366,7 +366,7 @@ ExtentInteraction.prototype.snapToVertex_ = function(pixel, map) {
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent pointer move event
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent pointer move event
|
||||
* @private
|
||||
*/
|
||||
ExtentInteraction.prototype.handlePointerMove_ = function(mapBrowserEvent) {
|
||||
|
||||
@@ -35,7 +35,7 @@ const KeyboardPan = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Browser event.
|
||||
* @return {boolean} Combined condition result.
|
||||
*/
|
||||
this.defaultCondition_ = function(mapBrowserEvent) {
|
||||
@@ -68,10 +68,10 @@ const KeyboardPan = function(opt_options) {
|
||||
inherits(KeyboardPan, Interaction);
|
||||
|
||||
/**
|
||||
* Handles the {@link ol.MapBrowserEvent map browser event} if it was a
|
||||
* Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a
|
||||
* `KeyEvent`, and decides the direction to pan to (if an arrow key was
|
||||
* pressed).
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.KeyboardPan}
|
||||
*/
|
||||
|
||||
@@ -55,10 +55,10 @@ inherits(KeyboardZoom, Interaction);
|
||||
|
||||
|
||||
/**
|
||||
* Handles the {@link ol.MapBrowserEvent map browser event} if it was a
|
||||
* Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a
|
||||
* `KeyEvent`, and decides whether to zoom in or out (depending on whether the
|
||||
* key pressed was '+' or '-').
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.KeyboardZoom}
|
||||
*/
|
||||
|
||||
@@ -68,8 +68,8 @@ export const ModifyEvent = function(type, features, mapBrowserPointerEvent) {
|
||||
this.features = features;
|
||||
|
||||
/**
|
||||
* Associated {@link ol.MapBrowserEvent}.
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
* @api
|
||||
*/
|
||||
this.mapBrowserEvent = mapBrowserPointerEvent;
|
||||
@@ -115,7 +115,7 @@ const Modify = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Browser event.
|
||||
* @return {boolean} Combined condition result.
|
||||
*/
|
||||
this.defaultDeleteCondition_ = function(mapBrowserEvent) {
|
||||
@@ -831,9 +831,9 @@ function handleUpEvent(evt) {
|
||||
|
||||
|
||||
/**
|
||||
* Handles the {@link ol.MapBrowserEvent map browser event} and may modify the
|
||||
* Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may modify the
|
||||
* geometry.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.Modify}
|
||||
*/
|
||||
@@ -866,7 +866,7 @@ function handleEvent(mapBrowserEvent) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} evt Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt Event.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.handlePointerMove_ = function(evt) {
|
||||
|
||||
@@ -136,9 +136,9 @@ inherits(MouseWheelZoom, Interaction);
|
||||
|
||||
|
||||
/**
|
||||
* Handles the {@link ol.MapBrowserEvent map browser event} (if it was a
|
||||
* Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a
|
||||
* mousewheel-event) and eventually zooms the map.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} Allow event propagation.
|
||||
* @this {ol.interaction.MouseWheelZoom}
|
||||
*/
|
||||
|
||||
@@ -166,10 +166,10 @@ PointerInteraction.prototype.updateTrackedPointers_ = function(mapBrowserEvent)
|
||||
|
||||
|
||||
/**
|
||||
* Handles the {@link ol.MapBrowserEvent map browser event} and may call into
|
||||
* Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may call into
|
||||
* other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are
|
||||
* detected.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.Pointer}
|
||||
* @api
|
||||
|
||||
@@ -37,8 +37,8 @@ const SelectEventType = {
|
||||
* @param {SelectEventType} type The event type.
|
||||
* @param {Array.<module:ol/Feature~Feature>} selected Selected features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} deselected Deselected features.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Associated
|
||||
* {@link ol.MapBrowserEvent}.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Associated
|
||||
* {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
|
||||
* @implements {oli.SelectEvent}
|
||||
* @extends {ol.events.Event}
|
||||
* @constructor
|
||||
@@ -61,8 +61,8 @@ const SelectEvent = function(type, selected, deselected, mapBrowserEvent) {
|
||||
this.deselected = deselected;
|
||||
|
||||
/**
|
||||
* Associated {@link ol.MapBrowserEvent}.
|
||||
* @type {ol.MapBrowserEvent}
|
||||
* Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
|
||||
* @type {module:ol/MapBrowserEvent~MapBrowserEvent}
|
||||
* @api
|
||||
*/
|
||||
this.mapBrowserEvent = mapBrowserEvent;
|
||||
@@ -244,9 +244,9 @@ Select.prototype.getLayer = function(feature) {
|
||||
|
||||
|
||||
/**
|
||||
* Handles the {@link ol.MapBrowserEvent map browser event} and may change the
|
||||
* Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may change the
|
||||
* selected state of features.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.Select}
|
||||
*/
|
||||
|
||||
@@ -580,7 +580,7 @@ Snap.prototype.writePolygonGeometry_ = function(feature, geometry) {
|
||||
|
||||
/**
|
||||
* Handle all pointer events events.
|
||||
* @param {ol.MapBrowserEvent} evt A move event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt A move event.
|
||||
* @return {boolean} Pass the event to other interactions.
|
||||
* @this {ol.interaction.Snap}
|
||||
*/
|
||||
|
||||
@@ -221,7 +221,7 @@ function handleDragEvent(event) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} event Event.
|
||||
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} event Event.
|
||||
* @this {ol.interaction.Translate}
|
||||
*/
|
||||
function handleMoveEvent(event) {
|
||||
|
||||
@@ -154,10 +154,10 @@ ol.DeclutterGroup;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes a {@link ol.MapBrowserEvent} and two
|
||||
* A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
|
||||
* {@link module:ol~Pixel}s and returns a `{boolean}`. If the condition is met,
|
||||
* true should be returned.
|
||||
* @typedef {function(ol.MapBrowserEvent, module:ol~Pixel, module:ol~Pixel):boolean}
|
||||
* @typedef {function(module:ol/MapBrowserEvent~MapBrowserEvent, module:ol~Pixel, module:ol~Pixel):boolean}
|
||||
*/
|
||||
ol.DragBoxEndConditionType;
|
||||
|
||||
@@ -174,10 +174,10 @@ ol.DrawGeometryFunctionType;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.MapBrowserEvent} and returns a
|
||||
* A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
|
||||
* `{boolean}`. If the condition is met, true should be returned.
|
||||
*
|
||||
* @typedef {function(ol.MapBrowserEvent): boolean}
|
||||
* @typedef {function(module:ol/MapBrowserEvent~MapBrowserEvent): boolean}
|
||||
*/
|
||||
ol.EventsConditionType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user