Don't import ourselves

This commit is contained in:
Frederic Junod
2018-09-06 09:01:46 +02:00
parent ba698258c0
commit ea616e7751
73 changed files with 157 additions and 157 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ class Collection extends BaseObject {
* Add elements to the collection. This pushes each item in the provided array * Add elements to the collection. This pushes each item in the provided array
* to the end of the collection. * to the end of the collection.
* @param {!Array<T>} arr Array. * @param {!Array<T>} arr Array.
* @return {import("./Collection.js").default<T>} This collection. * @return {Collection<T>} This collection.
* @api * @api
*/ */
extend(arr) { extend(arr) {
+1 -1
View File
@@ -114,7 +114,7 @@ class Feature extends BaseObject {
/** /**
* Clone this feature. If the original feature has a geometry it * Clone this feature. If the original feature has a geometry it
* is also cloned. The feature id is not set in the clone. * is also cloned. The feature id is not set in the clone.
* @return {import("./Feature.js").default} The clone. * @return {Feature} The clone.
* @api * @api
*/ */
clone() { clone() {
+1 -1
View File
@@ -22,7 +22,7 @@ import {getHeight} from './extent.js';
* post requests or - in general - through XHR requests, where the src of the * post requests or - in general - through XHR requests, where the src of the
* image element would be set to a data URI when the content is loaded. * image element would be set to a data URI when the content is loaded.
* *
* @typedef {function(import("./Image.js").default, string)} LoadFunction * @typedef {function(ImageWrapper, string)} LoadFunction
* @api * @api
*/ */
+1 -1
View File
@@ -8,7 +8,7 @@ import {listenOnce, unlistenByKey} from './events.js';
import EventType from './events/EventType.js'; import EventType from './events/EventType.js';
/** /**
* @typedef {function(new: import("./ImageTile.js").default, import("./tilecoord.js").TileCoord, * @typedef {function(new: ImageTile, import("./tilecoord.js").TileCoord,
* import("./TileState.js").default, string, ?string, import("./Tile.js").LoadFunction)} TileClass * import("./TileState.js").default, string, ?string, import("./Tile.js").LoadFunction)} TileClass
* @api * @api
*/ */
+3 -3
View File
@@ -56,7 +56,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js
/** /**
* @typedef {function(import("./PluggableMap.js").default, ?FrameState): boolean} PostRenderFunction * @typedef {function(PluggableMap, ?FrameState): boolean} PostRenderFunction
*/ */
@@ -392,7 +392,7 @@ class PluggableMap extends BaseObject {
this.controls.forEach( this.controls.forEach(
/** /**
* @param {import("./control/Control.js").default} control Control. * @param {import("./control/Control.js").default} control Control.
* @this {import("./PluggableMap.js").default} * @this {PluggableMap}
*/ */
(function(control) { (function(control) {
control.setMap(this); control.setMap(this);
@@ -417,7 +417,7 @@ class PluggableMap extends BaseObject {
this.interactions.forEach( this.interactions.forEach(
/** /**
* @param {import("./interaction/Interaction.js").default} interaction Interaction. * @param {import("./interaction/Interaction.js").default} interaction Interaction.
* @this {import("./PluggableMap.js").default} * @this {PluggableMap}
*/ */
(function(interaction) { (function(interaction) {
interaction.setMap(this); interaction.setMap(this);
+3 -3
View File
@@ -40,7 +40,7 @@ import EventType from './events/EventType.js';
* }); * });
* ``` * ```
* *
* @typedef {function(import("./Tile.js").default, string)} LoadFunction * @typedef {function(Tile, string)} LoadFunction
* @api * @api
*/ */
@@ -101,7 +101,7 @@ class Tile extends EventTarget {
* An "interim" tile for this tile. The interim tile may be used while this * An "interim" tile for this tile. The interim tile may be used while this
* one is loading, for "smooth" transitions when changing params/dimensions * one is loading, for "smooth" transitions when changing params/dimensions
* on the source. * on the source.
* @type {import("./Tile.js").default} * @type {Tile}
*/ */
this.interimTile = null; this.interimTile = null;
@@ -146,7 +146,7 @@ class Tile extends EventTarget {
* Get the interim tile most suitable for rendering using the chain of interim * Get the interim tile most suitable for rendering using the chain of interim
* tiles. This corresponds to the most recent tile that has been loaded, if no * tiles. This corresponds to the most recent tile that has been loaded, if no
* such tile exists, the original tile is returned. * such tile exists, the original tile is returned.
* @return {!import("./Tile.js").default} Best tile for rendering. * @return {!Tile} Best tile for rendering.
*/ */
getInterimTile() { getInterimTile() {
if (!this.interimTile) { if (!this.interimTile) {
+6 -6
View File
@@ -47,7 +47,7 @@ class TileRange {
} }
/** /**
* @param {import("./TileRange.js").default} tileRange Tile range. * @param {TileRange} tileRange Tile range.
* @return {boolean} Contains. * @return {boolean} Contains.
*/ */
containsTileRange(tileRange) { containsTileRange(tileRange) {
@@ -65,7 +65,7 @@ class TileRange {
} }
/** /**
* @param {import("./TileRange.js").default} tileRange Tile range. * @param {TileRange} tileRange Tile range.
* @return {boolean} Equals. * @return {boolean} Equals.
*/ */
equals(tileRange) { equals(tileRange) {
@@ -74,7 +74,7 @@ class TileRange {
} }
/** /**
* @param {import("./TileRange.js").default} tileRange Tile range. * @param {TileRange} tileRange Tile range.
*/ */
extend(tileRange) { extend(tileRange) {
if (tileRange.minX < this.minX) { if (tileRange.minX < this.minX) {
@@ -113,7 +113,7 @@ class TileRange {
} }
/** /**
* @param {import("./TileRange.js").default} tileRange Tile range. * @param {TileRange} tileRange Tile range.
* @return {boolean} Intersects. * @return {boolean} Intersects.
*/ */
intersects(tileRange) { intersects(tileRange) {
@@ -130,8 +130,8 @@ class TileRange {
* @param {number} maxX Maximum X. * @param {number} maxX Maximum X.
* @param {number} minY Minimum Y. * @param {number} minY Minimum Y.
* @param {number} maxY Maximum Y. * @param {number} maxY Maximum Y.
* @param {import("./TileRange.js").default=} tileRange TileRange. * @param {TileRange=} tileRange TileRange.
* @return {import("./TileRange.js").default} Tile range. * @return {TileRange} Tile range.
*/ */
export function createOrUpdate(minX, maxX, minY, maxY, tileRange) { export function createOrUpdate(minX, maxX, minY, maxY, tileRange) {
if (tileRange !== undefined) { if (tileRange !== undefined) {
+1 -1
View File
@@ -13,7 +13,7 @@ const DEFAULT_EXTENT = [0, 0, 4096, 4096];
/** /**
* @typedef {function(new: import("./VectorTile.js").default, import("./tilecoord.js").TileCoord, * @typedef {function(new: VectorTile, import("./tilecoord.js").TileCoord,
* import("./TileState.js").default, string, ?string, import("./Tile.js").LoadFunction)} TileClass * import("./TileState.js").default, string, ?string, import("./Tile.js").LoadFunction)} TileClass
* @api * @api
*/ */
+1 -1
View File
@@ -316,7 +316,7 @@ class Attribution extends Control {
/** /**
* Update the attribution element. * Update the attribution element.
* @param {import("../MapEvent.js").default} mapEvent Map event. * @param {import("../MapEvent.js").default} mapEvent Map event.
* @this {import("./Attribution.js").default} * @this {Attribution}
* @api * @api
*/ */
export function render(mapEvent) { export function render(mapEvent) {
+1 -1
View File
@@ -246,7 +246,7 @@ class MousePosition extends Control {
/** /**
* Update the mouseposition element. * Update the mouseposition element.
* @param {import("../MapEvent.js").default} mapEvent Map event. * @param {import("../MapEvent.js").default} mapEvent Map event.
* @this {import("./MousePosition.js").default} * @this {MousePosition}
* @api * @api
*/ */
export function render(mapEvent) { export function render(mapEvent) {
+1 -1
View File
@@ -570,7 +570,7 @@ class OverviewMap extends Control {
/** /**
* Update the overview map element. * Update the overview map element.
* @param {import("../MapEvent.js").default} mapEvent Map event. * @param {import("../MapEvent.js").default} mapEvent Map event.
* @this {import("./OverviewMap.js").default} * @this {OverviewMap}
* @api * @api
*/ */
export function render(mapEvent) { export function render(mapEvent) {
+1 -1
View File
@@ -150,7 +150,7 @@ class Rotate extends Control {
/** /**
* Update the rotate control element. * Update the rotate control element.
* @param {import("../MapEvent.js").default} mapEvent Map event. * @param {import("../MapEvent.js").default} mapEvent Map event.
* @this {import("./Rotate.js").default} * @this {Rotate}
* @api * @api
*/ */
export function render(mapEvent) { export function render(mapEvent) {
+1 -1
View File
@@ -283,7 +283,7 @@ class ScaleLine extends Control {
/** /**
* Update the scale line element. * Update the scale line element.
* @param {import("../MapEvent.js").default} mapEvent Map event. * @param {import("../MapEvent.js").default} mapEvent Map event.
* @this {import("./ScaleLine.js").default} * @this {ScaleLine}
* @api * @api
*/ */
export function render(mapEvent) { export function render(mapEvent) {
+1 -1
View File
@@ -345,7 +345,7 @@ class ZoomSlider extends Control {
/** /**
* Update the zoomslider element. * Update the zoomslider element.
* @param {import("../MapEvent.js").default} mapEvent Map event. * @param {import("../MapEvent.js").default} mapEvent Map event.
* @this {import("./ZoomSlider.js").default} * @this {ZoomSlider}
* @api * @api
*/ */
export function render(mapEvent) { export function render(mapEvent) {
+1 -1
View File
@@ -8,7 +8,7 @@ import Event from '../events/Event.js';
/** /**
* @typedef {EventTarget|import("./Target.js").default} EventTargetLike * @typedef {EventTarget|Target} EventTargetLike
*/ */
+2 -2
View File
@@ -2207,7 +2207,7 @@ const DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array<import("../Feature.js").default>} features Features. * @param {Array<import("../Feature.js").default>} features Features.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @this {import("./KML.js").default} * @this {KML}
*/ */
function writeDocument(node, features, objectStack) { function writeDocument(node, features, objectStack) {
const /** @type {import("../xml.js").NodeStackItem} */ context = {node: node}; const /** @type {import("../xml.js").NodeStackItem} */ context = {node: node};
@@ -2660,7 +2660,7 @@ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');
* @param {Element} node Node. * @param {Element} node Node.
* @param {import("../Feature.js").default} feature Feature. * @param {import("../Feature.js").default} feature Feature.
* @param {Array<*>} objectStack Object stack. * @param {Array<*>} objectStack Object stack.
* @this {import("./KML.js").default} * @this {KML}
*/ */
function writePlacemark(node, feature, objectStack) { function writePlacemark(node, feature, objectStack) {
const /** @type {import("../xml.js").NodeStackItem} */ context = {node: node}; const /** @type {import("../xml.js").NodeStackItem} */ context = {node: node};
+2 -2
View File
@@ -33,7 +33,7 @@ class Circle extends SimpleGeometry {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!import("./Circle.js").default} Clone. * @return {!Circle} Clone.
* @override * @override
* @api * @api
*/ */
@@ -230,7 +230,7 @@ class Circle extends SimpleGeometry {
* string identifier or a {@link module:ol/proj/Projection~Projection} object. * string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a * @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object. * string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {import("./Circle.js").default} This geometry. Note that original geometry is * @return {Circle} This geometry. Note that original geometry is
* modified in place. * modified in place.
* @function * @function
* @api * @api
+5 -5
View File
@@ -47,7 +47,7 @@ class Geometry extends BaseObject {
/** /**
* @protected * @protected
* @type {Object<string, import("./Geometry.js").default>} * @type {Object<string, Geometry>}
*/ */
this.simplifiedGeometryCache = {}; this.simplifiedGeometryCache = {};
@@ -68,7 +68,7 @@ class Geometry extends BaseObject {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @abstract * @abstract
* @return {!import("./Geometry.js").default} Clone. * @return {!Geometry} Clone.
*/ */
clone() {} clone() {}
@@ -159,7 +159,7 @@ class Geometry extends BaseObject {
* Douglas Peucker} algorithm. For polygons, a quantization-based * Douglas Peucker} algorithm. For polygons, a quantization-based
* simplification is used to preserve topology. * simplification is used to preserve topology.
* @param {number} tolerance The tolerance distance for simplification. * @param {number} tolerance The tolerance distance for simplification.
* @return {import("./Geometry.js").default} A new, simplified version of the original geometry. * @return {Geometry} A new, simplified version of the original geometry.
* @api * @api
*/ */
simplify(tolerance) { simplify(tolerance) {
@@ -172,7 +172,7 @@ class Geometry extends BaseObject {
* See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm. * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.
* @abstract * @abstract
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @return {import("./Geometry.js").default} Simplified geometry. * @return {Geometry} Simplified geometry.
*/ */
getSimplifiedGeometry(squaredTolerance) {} getSimplifiedGeometry(squaredTolerance) {}
@@ -222,7 +222,7 @@ class Geometry extends BaseObject {
* string identifier or a {@link module:ol/proj/Projection~Projection} object. * string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a * @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object. * string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {import("./Geometry.js").default} This geometry. Note that original geometry is * @return {Geometry} This geometry. Note that original geometry is
* modified in place. * modified in place.
* @api * @api
*/ */
+1 -1
View File
@@ -62,7 +62,7 @@ class GeometryCollection extends Geometry {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!import("./GeometryCollection.js").default} Clone. * @return {!GeometryCollection} Clone.
* @override * @override
* @api * @api
*/ */
+1 -1
View File
@@ -80,7 +80,7 @@ class LineString extends SimpleGeometry {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!import("./LineString.js").default} Clone. * @return {!LineString} Clone.
* @override * @override
* @api * @api
*/ */
+1 -1
View File
@@ -51,7 +51,7 @@ class LinearRing extends SimpleGeometry {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!import("./LinearRing.js").default} Clone. * @return {!LinearRing} Clone.
* @override * @override
* @api * @api
*/ */
+1 -1
View File
@@ -91,7 +91,7 @@ class MultiLineString extends SimpleGeometry {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!import("./MultiLineString.js").default} Clone. * @return {!MultiLineString} Clone.
* @override * @override
* @api * @api
*/ */
+1 -1
View File
@@ -48,7 +48,7 @@ class MultiPoint extends SimpleGeometry {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!import("./MultiPoint.js").default} Clone. * @return {!MultiPoint} Clone.
* @override * @override
* @api * @api
*/ */
+1 -1
View File
@@ -135,7 +135,7 @@ class MultiPolygon extends SimpleGeometry {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!import("./MultiPolygon.js").default} Clone. * @return {!MultiPolygon} Clone.
* @override * @override
* @api * @api
*/ */
+1 -1
View File
@@ -26,7 +26,7 @@ class Point extends SimpleGeometry {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!import("./Point.js").default} Clone. * @return {!Point} Clone.
* @override * @override
* @api * @api
*/ */
+5 -5
View File
@@ -111,7 +111,7 @@ class Polygon extends SimpleGeometry {
/** /**
* Make a complete copy of the geometry. * Make a complete copy of the geometry.
* @return {!import("./Polygon.js").default} Clone. * @return {!Polygon} Clone.
* @override * @override
* @api * @api
*/ */
@@ -342,7 +342,7 @@ export default Polygon;
* polygon. Default is `32`. * polygon. Default is `32`.
* @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to * @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to
* the Earth's mean radius using the WGS84 ellipsoid). * the Earth's mean radius using the WGS84 ellipsoid).
* @return {import("./Polygon.js").default} The "circular" polygon. * @return {Polygon} The "circular" polygon.
* @api * @api
*/ */
export function circular(center, radius, opt_n, opt_sphereRadius) { export function circular(center, radius, opt_n, opt_sphereRadius) {
@@ -360,7 +360,7 @@ export function circular(center, radius, opt_n, opt_sphereRadius) {
/** /**
* Create a polygon from an extent. The layout used is `XY`. * Create a polygon from an extent. The layout used is `XY`.
* @param {import("../extent.js").Extent} extent The extent. * @param {import("../extent.js").Extent} extent The extent.
* @return {import("./Polygon.js").default} The polygon. * @return {Polygon} The polygon.
* @api * @api
*/ */
export function fromExtent(extent) { export function fromExtent(extent) {
@@ -380,7 +380,7 @@ export function fromExtent(extent) {
* @param {number=} opt_sides Number of sides of the polygon. Default is 32. * @param {number=} opt_sides Number of sides of the polygon. Default is 32.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in * @param {number=} opt_angle Start angle for the first vertex of the polygon in
* radians. Default is 0. * radians. Default is 0.
* @return {import("./Polygon.js").default} Polygon geometry. * @return {Polygon} Polygon geometry.
* @api * @api
*/ */
export function fromCircle(circle, opt_sides, opt_angle) { export function fromCircle(circle, opt_sides, opt_angle) {
@@ -406,7 +406,7 @@ export function fromCircle(circle, opt_sides, opt_angle) {
/** /**
* Modify the coordinates of a polygon to make it a regular polygon. * Modify the coordinates of a polygon to make it a regular polygon.
* @param {import("./Polygon.js").default} polygon Polygon geometry. * @param {Polygon} polygon Polygon geometry.
* @param {import("../coordinate.js").Coordinate} center Center of the regular polygon. * @param {import("../coordinate.js").Coordinate} center Center of the regular polygon.
* @param {number} radius Radius of the regular polygon. * @param {number} radius Radius of the regular polygon.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in * @param {number=} opt_angle Start angle for the first vertex of the polygon in
+2 -2
View File
@@ -130,7 +130,7 @@ class SimpleGeometry extends Geometry {
/** /**
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @return {import("./SimpleGeometry.js").default} Simplified geometry. * @return {SimpleGeometry} Simplified geometry.
* @protected * @protected
*/ */
getSimplifiedGeometryInternal(squaredTolerance) { getSimplifiedGeometryInternal(squaredTolerance) {
@@ -298,7 +298,7 @@ SimpleGeometry.prototype.containsXY = FALSE;
/** /**
* @param {import("./SimpleGeometry.js").default} simpleGeometry Simple geometry. * @param {SimpleGeometry} simpleGeometry Simple geometry.
* @param {import("../transform.js").Transform} transform Transform. * @param {import("../transform.js").Transform} transform Transform.
* @param {Array<number>=} opt_dest Destination. * @param {Array<number>=} opt_dest Destination.
* @return {Array<number>} Transformed flat coordinates. * @return {Array<number>} Transformed flat coordinates.
+1 -1
View File
@@ -51,7 +51,7 @@ class DoubleClickZoom extends Interaction {
* doubleclick) and eventually zooms the map. * doubleclick) and eventually zooms the map.
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {import("./DoubleClickZoom.js").default} * @this {DoubleClickZoom}
*/ */
function handleEvent(mapBrowserEvent) { function handleEvent(mapBrowserEvent) {
let stopEvent = false; let stopEvent = false;
+1 -1
View File
@@ -244,7 +244,7 @@ class DragAndDrop extends Interaction {
/** /**
* @param {DragEvent} event Event. * @param {DragEvent} event Event.
* @this {import("./DragAndDrop.js").default} * @this {DragAndDrop}
*/ */
function handleDrop(event) { function handleDrop(event) {
const files = event.dataTransfer.files; const files = event.dataTransfer.files;
+6 -6
View File
@@ -28,7 +28,7 @@ import RenderBox from '../render/Box.js';
* @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
* {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired. * {@link module:ol/pixel~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. * Default is `true` if the area of the box is bigger than the `minArea` option.
* @property {function(this:import("./DragBox.js").default, import("../MapBrowserEvent.js").default)} onBoxEnd Code to execute just * @property {function(this:DragBox, import("../MapBrowserEvent.js").default)} onBoxEnd Code to execute just
* before `boxend` is fired. * before `boxend` is fired.
*/ */
@@ -137,7 +137,7 @@ class DragBox extends PointerInteraction {
/** /**
* Function to execute just before `onboxend` is fired * Function to execute just before `onboxend` is fired
* @type {function(this:import("./DragBox.js").default, import("../MapBrowserEvent.js").default)} * @type {function(this:DragBox, import("../MapBrowserEvent.js").default)}
* @private * @private
*/ */
this.onBoxEnd_ = options.onBoxEnd ? options.onBoxEnd : VOID; this.onBoxEnd_ = options.onBoxEnd ? options.onBoxEnd : VOID;
@@ -181,7 +181,7 @@ class DragBox extends PointerInteraction {
* @param {import("../pixel.js").Pixel} startPixel The starting pixel of the box. * @param {import("../pixel.js").Pixel} startPixel The starting pixel of the box.
* @param {import("../pixel.js").Pixel} endPixel The end pixel of the box. * @param {import("../pixel.js").Pixel} endPixel The end pixel of the box.
* @return {boolean} Whether or not the boxend condition should be fired. * @return {boolean} Whether or not the boxend condition should be fired.
* @this {import("./DragBox.js").default} * @this {DragBox}
*/ */
function defaultBoxEndCondition(mapBrowserEvent, startPixel, endPixel) { function defaultBoxEndCondition(mapBrowserEvent, startPixel, endPixel) {
const width = endPixel[0] - startPixel[0]; const width = endPixel[0] - startPixel[0];
@@ -192,7 +192,7 @@ function defaultBoxEndCondition(mapBrowserEvent, startPixel, endPixel) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./DragBox.js").default} * @this {DragBox}
*/ */
function handleDragEvent(mapBrowserEvent) { function handleDragEvent(mapBrowserEvent) {
if (!mouseOnly(mapBrowserEvent)) { if (!mouseOnly(mapBrowserEvent)) {
@@ -209,7 +209,7 @@ function handleDragEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./DragBox.js").default} * @this {DragBox}
*/ */
function handleUpEvent(mapBrowserEvent) { function handleUpEvent(mapBrowserEvent) {
if (!mouseOnly(mapBrowserEvent)) { if (!mouseOnly(mapBrowserEvent)) {
@@ -230,7 +230,7 @@ function handleUpEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Start drag sequence? * @return {boolean} Start drag sequence?
* @this {import("./DragBox.js").default} * @this {DragBox}
*/ */
function handleDownEvent(mapBrowserEvent) { function handleDownEvent(mapBrowserEvent) {
if (!mouseOnly(mapBrowserEvent)) { if (!mouseOnly(mapBrowserEvent)) {
+3 -3
View File
@@ -78,7 +78,7 @@ class DragPan extends PointerInteraction {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./DragPan.js").default} * @this {DragPan}
*/ */
function handleDragEvent(mapBrowserEvent) { function handleDragEvent(mapBrowserEvent) {
if (!this.panning_) { if (!this.panning_) {
@@ -116,7 +116,7 @@ function handleDragEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./DragPan.js").default} * @this {DragPan}
*/ */
function handleUpEvent(mapBrowserEvent) { function handleUpEvent(mapBrowserEvent) {
const map = mapBrowserEvent.map; const map = mapBrowserEvent.map;
@@ -157,7 +157,7 @@ function handleUpEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Start drag sequence? * @return {boolean} Start drag sequence?
* @this {import("./DragPan.js").default} * @this {DragPan}
*/ */
function handleDownEvent(mapBrowserEvent) { function handleDownEvent(mapBrowserEvent) {
if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) { if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {
+3 -3
View File
@@ -69,7 +69,7 @@ class DragRotate extends PointerInteraction {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./DragRotate.js").default} * @this {DragRotate}
*/ */
function handleDragEvent(mapBrowserEvent) { function handleDragEvent(mapBrowserEvent) {
if (!mouseOnly(mapBrowserEvent)) { if (!mouseOnly(mapBrowserEvent)) {
@@ -97,7 +97,7 @@ function handleDragEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./DragRotate.js").default} * @this {DragRotate}
*/ */
function handleUpEvent(mapBrowserEvent) { function handleUpEvent(mapBrowserEvent) {
if (!mouseOnly(mapBrowserEvent)) { if (!mouseOnly(mapBrowserEvent)) {
@@ -116,7 +116,7 @@ function handleUpEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Start drag sequence? * @return {boolean} Start drag sequence?
* @this {import("./DragRotate.js").default} * @this {DragRotate}
*/ */
function handleDownEvent(mapBrowserEvent) { function handleDownEvent(mapBrowserEvent) {
if (!mouseOnly(mapBrowserEvent)) { if (!mouseOnly(mapBrowserEvent)) {
+3 -3
View File
@@ -81,7 +81,7 @@ class DragRotateAndZoom extends PointerInteraction {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./DragRotateAndZoom.js").default} * @this {DragRotateAndZoom}
*/ */
function handleDragEvent(mapBrowserEvent) { function handleDragEvent(mapBrowserEvent) {
if (!mouseOnly(mapBrowserEvent)) { if (!mouseOnly(mapBrowserEvent)) {
@@ -115,7 +115,7 @@ function handleDragEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./DragRotateAndZoom.js").default} * @this {DragRotateAndZoom}
*/ */
function handleUpEvent(mapBrowserEvent) { function handleUpEvent(mapBrowserEvent) {
if (!mouseOnly(mapBrowserEvent)) { if (!mouseOnly(mapBrowserEvent)) {
@@ -136,7 +136,7 @@ function handleUpEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Start drag sequence? * @return {boolean} Start drag sequence?
* @this {import("./DragRotateAndZoom.js").default} * @this {DragRotateAndZoom}
*/ */
function handleDownEvent(mapBrowserEvent) { function handleDownEvent(mapBrowserEvent) {
if (!mouseOnly(mapBrowserEvent)) { if (!mouseOnly(mapBrowserEvent)) {
+1 -1
View File
@@ -61,7 +61,7 @@ class DragZoom extends DragBox {
/** /**
* @this {import("./DragZoom.js").default} * @this {DragZoom}
*/ */
function onBoxEnd() { function onBoxEnd() {
const map = this.getMap(); const map = this.getMap();
+3 -3
View File
@@ -823,7 +823,7 @@ function getDefaultStyleFunction() {
* draw or finish the drawing. * draw or finish the drawing.
* @param {import("../MapBrowserEvent.js").default} event Map browser event. * @param {import("../MapBrowserEvent.js").default} event Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {import("./Draw.js").default} * @this {Draw}
* @api * @api
*/ */
export function handleEvent(event) { export function handleEvent(event) {
@@ -875,7 +875,7 @@ export function handleEvent(event) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} event Event. * @param {import("../MapBrowserPointerEvent.js").default} event Event.
* @return {boolean} Start drag sequence? * @return {boolean} Start drag sequence?
* @this {import("./Draw.js").default} * @this {Draw}
*/ */
function handleDownEvent(event) { function handleDownEvent(event) {
this.shouldHandle_ = !this.freehand_; this.shouldHandle_ = !this.freehand_;
@@ -903,7 +903,7 @@ function handleDownEvent(event) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} event Event. * @param {import("../MapBrowserPointerEvent.js").default} event Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./Draw.js").default} * @this {Draw}
*/ */
function handleUpEvent(event) { function handleUpEvent(event) {
let pass = true; let pass = true;
+1 -1
View File
@@ -87,7 +87,7 @@ class KeyboardPan extends Interaction {
* pressed). * pressed).
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {import("./KeyboardPan.js").default} * @this {KeyboardPan}
*/ */
function handleEvent(mapBrowserEvent) { function handleEvent(mapBrowserEvent) {
let stopEvent = false; let stopEvent = false;
+1 -1
View File
@@ -71,7 +71,7 @@ class KeyboardZoom extends Interaction {
* key pressed was '+' or '-'). * key pressed was '+' or '-').
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {import("./KeyboardZoom.js").default} * @this {KeyboardZoom}
*/ */
function handleEvent(mapBrowserEvent) { function handleEvent(mapBrowserEvent) {
let stopEvent = false; let stopEvent = false;
+4 -4
View File
@@ -987,7 +987,7 @@ function compareIndexes(a, b) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} evt Event. * @param {import("../MapBrowserPointerEvent.js").default} evt Event.
* @return {boolean} Start drag sequence? * @return {boolean} Start drag sequence?
* @this {import("./Modify.js").default} * @this {Modify}
*/ */
function handleDownEvent(evt) { function handleDownEvent(evt) {
if (!this.condition_(evt)) { if (!this.condition_(evt)) {
@@ -1062,7 +1062,7 @@ function handleDownEvent(evt) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} evt Event. * @param {import("../MapBrowserPointerEvent.js").default} evt Event.
* @this {import("./Modify.js").default} * @this {Modify}
*/ */
function handleDragEvent(evt) { function handleDragEvent(evt) {
this.ignoreNextSingleClick_ = false; this.ignoreNextSingleClick_ = false;
@@ -1139,7 +1139,7 @@ function handleDragEvent(evt) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} evt Event. * @param {import("../MapBrowserPointerEvent.js").default} evt Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./Modify.js").default} * @this {Modify}
*/ */
function handleUpEvent(evt) { function handleUpEvent(evt) {
for (let i = this.dragSegments_.length - 1; i >= 0; --i) { for (let i = this.dragSegments_.length - 1; i >= 0; --i) {
@@ -1171,7 +1171,7 @@ function handleUpEvent(evt) {
* geometry. * geometry.
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {import("./Modify.js").default} * @this {Modify}
*/ */
function handleEvent(mapBrowserEvent) { function handleEvent(mapBrowserEvent) {
if (!(mapBrowserEvent instanceof MapBrowserPointerEvent)) { if (!(mapBrowserEvent instanceof MapBrowserPointerEvent)) {
+1 -1
View File
@@ -196,7 +196,7 @@ class MouseWheelZoom extends Interaction {
* mousewheel-event) and eventually zooms the map. * mousewheel-event) and eventually zooms the map.
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
* @return {boolean} Allow event propagation. * @return {boolean} Allow event propagation.
* @this {import("./MouseWheelZoom.js").default} * @this {MouseWheelZoom}
*/ */
function handleEvent(mapBrowserEvent) { function handleEvent(mapBrowserEvent) {
if (!this.condition_(mapBrowserEvent)) { if (!this.condition_(mapBrowserEvent)) {
+3 -3
View File
@@ -80,7 +80,7 @@ class PinchRotate extends PointerInteraction {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./PinchRotate.js").default} * @this {PinchRotate}
*/ */
function handleDragEvent(mapBrowserEvent) { function handleDragEvent(mapBrowserEvent) {
let rotationDelta = 0.0; let rotationDelta = 0.0;
@@ -131,7 +131,7 @@ function handleDragEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./PinchRotate.js").default} * @this {PinchRotate}
*/ */
function handleUpEvent(mapBrowserEvent) { function handleUpEvent(mapBrowserEvent) {
if (this.targetPointers.length < 2) { if (this.targetPointers.length < 2) {
@@ -152,7 +152,7 @@ function handleUpEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Start drag sequence? * @return {boolean} Start drag sequence?
* @this {import("./PinchRotate.js").default} * @this {PinchRotate}
*/ */
function handleDownEvent(mapBrowserEvent) { function handleDownEvent(mapBrowserEvent) {
if (this.targetPointers.length >= 2) { if (this.targetPointers.length >= 2) {
+3 -3
View File
@@ -73,7 +73,7 @@ class PinchZoom extends PointerInteraction {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./PinchZoom.js").default} * @this {PinchZoom}
*/ */
function handleDragEvent(mapBrowserEvent) { function handleDragEvent(mapBrowserEvent) {
let scaleDelta = 1.0; let scaleDelta = 1.0;
@@ -126,7 +126,7 @@ function handleDragEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./PinchZoom.js").default} * @this {PinchZoom}
*/ */
function handleUpEvent(mapBrowserEvent) { function handleUpEvent(mapBrowserEvent) {
if (this.targetPointers.length < 2) { if (this.targetPointers.length < 2) {
@@ -153,7 +153,7 @@ function handleUpEvent(mapBrowserEvent) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Start drag sequence? * @return {boolean} Start drag sequence?
* @this {import("./PinchZoom.js").default} * @this {PinchZoom}
*/ */
function handleDownEvent(mapBrowserEvent) { function handleDownEvent(mapBrowserEvent) {
if (this.targetPointers.length >= 2) { if (this.targetPointers.length >= 2) {
+5 -5
View File
@@ -10,7 +10,7 @@ import {getValues} from '../obj.js';
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./Pointer.js").default} * @this {PointerInteraction}
*/ */
const handleDragEvent = VOID; const handleDragEvent = VOID;
@@ -18,7 +18,7 @@ const handleDragEvent = VOID;
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Capture dragging. * @return {boolean} Capture dragging.
* @this {import("./Pointer.js").default} * @this {PointerInteraction}
*/ */
const handleUpEvent = FALSE; const handleUpEvent = FALSE;
@@ -26,14 +26,14 @@ const handleUpEvent = FALSE;
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Capture dragging. * @return {boolean} Capture dragging.
* @this {import("./Pointer.js").default} * @this {PointerInteraction}
*/ */
const handleDownEvent = FALSE; const handleDownEvent = FALSE;
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event. * @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./Pointer.js").default} * @this {PointerInteraction}
*/ */
const handleMoveEvent = VOID; const handleMoveEvent = VOID;
@@ -203,7 +203,7 @@ function isPointerDraggingEvent(mapBrowserEvent) {
* detected. * detected.
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {import("./Pointer.js").default} * @this {PointerInteraction}
* @api * @api
*/ */
export function handleEvent(mapBrowserEvent) { export function handleEvent(mapBrowserEvent) {
+1 -1
View File
@@ -385,7 +385,7 @@ class Select extends Interaction {
* selected state of features. * selected state of features.
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {import("./Select.js").default} * @this {Select}
*/ */
function handleEvent(mapBrowserEvent) { function handleEvent(mapBrowserEvent) {
if (!this.condition_(mapBrowserEvent)) { if (!this.condition_(mapBrowserEvent)) {
+3 -3
View File
@@ -591,7 +591,7 @@ class Snap extends PointerInteraction {
* Handle all pointer events events. * Handle all pointer events events.
* @param {import("../MapBrowserEvent.js").default} evt A move event. * @param {import("../MapBrowserEvent.js").default} evt A move event.
* @return {boolean} Pass the event to other interactions. * @return {boolean} Pass the event to other interactions.
* @this {import("./Snap.js").default} * @this {Snap}
*/ */
export function handleEvent(evt) { export function handleEvent(evt) {
const result = this.snapTo(evt.pixel, evt.coordinate, evt.map); const result = this.snapTo(evt.pixel, evt.coordinate, evt.map);
@@ -606,7 +606,7 @@ export function handleEvent(evt) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} evt Event. * @param {import("../MapBrowserPointerEvent.js").default} evt Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./Snap.js").default} * @this {Snap}
*/ */
function handleUpEvent(evt) { function handleUpEvent(evt) {
const featuresToUpdate = getValues(this.pendingFeatures_); const featuresToUpdate = getValues(this.pendingFeatures_);
@@ -623,7 +623,7 @@ function handleUpEvent(evt) {
* @param {SegmentData} a The first segment data. * @param {SegmentData} a The first segment data.
* @param {SegmentData} b The second segment data. * @param {SegmentData} b The second segment data.
* @return {number} The difference in distance. * @return {number} The difference in distance.
* @this {import("./Snap.js").default} * @this {Snap}
*/ */
function sortByDistance(a, b) { function sortByDistance(a, b) {
const deltaA = squaredDistanceToSegment(this.pixelCoordinate_, a.segment); const deltaA = squaredDistanceToSegment(this.pixelCoordinate_, a.segment);
+4 -4
View File
@@ -238,7 +238,7 @@ class Translate extends PointerInteraction {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} event Event. * @param {import("../MapBrowserPointerEvent.js").default} event Event.
* @return {boolean} Start drag sequence? * @return {boolean} Start drag sequence?
* @this {import("./Translate.js").default} * @this {Translate}
*/ */
function handleDownEvent(event) { function handleDownEvent(event) {
this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map); this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map);
@@ -261,7 +261,7 @@ function handleDownEvent(event) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} event Event. * @param {import("../MapBrowserPointerEvent.js").default} event Event.
* @return {boolean} Stop drag sequence? * @return {boolean} Stop drag sequence?
* @this {import("./Translate.js").default} * @this {Translate}
*/ */
function handleUpEvent(event) { function handleUpEvent(event) {
if (this.lastCoordinate_) { if (this.lastCoordinate_) {
@@ -282,7 +282,7 @@ function handleUpEvent(event) {
/** /**
* @param {import("../MapBrowserPointerEvent.js").default} event Event. * @param {import("../MapBrowserPointerEvent.js").default} event Event.
* @this {import("./Translate.js").default} * @this {Translate}
*/ */
function handleDragEvent(event) { function handleDragEvent(event) {
if (this.lastCoordinate_) { if (this.lastCoordinate_) {
@@ -309,7 +309,7 @@ function handleDragEvent(event) {
/** /**
* @param {import("../MapBrowserEvent.js").default} event Event. * @param {import("../MapBrowserEvent.js").default} event Event.
* @this {import("./Translate.js").default} * @this {Translate}
*/ */
function handleMoveEvent(event) { function handleMoveEvent(event) {
const elem = event.map.getViewport(); const elem = event.map.getViewport();
+5 -5
View File
@@ -57,7 +57,7 @@ const DEDUP_DIST = 25;
/** /**
* Handler for `mousedown`. * Handler for `mousedown`.
* *
* @this {import("./MouseSource.js").default} * @this {MouseSource}
* @param {MouseEvent} inEvent The in event. * @param {MouseEvent} inEvent The in event.
*/ */
function mousedown(inEvent) { function mousedown(inEvent) {
@@ -76,7 +76,7 @@ function mousedown(inEvent) {
/** /**
* Handler for `mousemove`. * Handler for `mousemove`.
* *
* @this {import("./MouseSource.js").default} * @this {MouseSource}
* @param {MouseEvent} inEvent The in event. * @param {MouseEvent} inEvent The in event.
*/ */
function mousemove(inEvent) { function mousemove(inEvent) {
@@ -89,7 +89,7 @@ function mousemove(inEvent) {
/** /**
* Handler for `mouseup`. * Handler for `mouseup`.
* *
* @this {import("./MouseSource.js").default} * @this {MouseSource}
* @param {MouseEvent} inEvent The in event. * @param {MouseEvent} inEvent The in event.
*/ */
function mouseup(inEvent) { function mouseup(inEvent) {
@@ -107,7 +107,7 @@ function mouseup(inEvent) {
/** /**
* Handler for `mouseover`. * Handler for `mouseover`.
* *
* @this {import("./MouseSource.js").default} * @this {MouseSource}
* @param {MouseEvent} inEvent The in event. * @param {MouseEvent} inEvent The in event.
*/ */
function mouseover(inEvent) { function mouseover(inEvent) {
@@ -120,7 +120,7 @@ function mouseover(inEvent) {
/** /**
* Handler for `mouseout`. * Handler for `mouseout`.
* *
* @this {import("./MouseSource.js").default} * @this {MouseSource}
* @param {MouseEvent} inEvent The in event. * @param {MouseEvent} inEvent The in event.
*/ */
function mouseout(inEvent) { function mouseout(inEvent) {
+8 -8
View File
@@ -49,7 +49,7 @@ const POINTER_TYPES = [
/** /**
* Handler for `msPointerDown`. * Handler for `msPointerDown`.
* *
* @this {import("./MsSource.js").default} * @this {MsSource}
* @param {MSPointerEvent} inEvent The in event. * @param {MSPointerEvent} inEvent The in event.
*/ */
function msPointerDown(inEvent) { function msPointerDown(inEvent) {
@@ -61,7 +61,7 @@ function msPointerDown(inEvent) {
/** /**
* Handler for `msPointerMove`. * Handler for `msPointerMove`.
* *
* @this {import("./MsSource.js").default} * @this {MsSource}
* @param {MSPointerEvent} inEvent The in event. * @param {MSPointerEvent} inEvent The in event.
*/ */
function msPointerMove(inEvent) { function msPointerMove(inEvent) {
@@ -72,7 +72,7 @@ function msPointerMove(inEvent) {
/** /**
* Handler for `msPointerUp`. * Handler for `msPointerUp`.
* *
* @this {import("./MsSource.js").default} * @this {MsSource}
* @param {MSPointerEvent} inEvent The in event. * @param {MSPointerEvent} inEvent The in event.
*/ */
function msPointerUp(inEvent) { function msPointerUp(inEvent) {
@@ -84,7 +84,7 @@ function msPointerUp(inEvent) {
/** /**
* Handler for `msPointerOut`. * Handler for `msPointerOut`.
* *
* @this {import("./MsSource.js").default} * @this {MsSource}
* @param {MSPointerEvent} inEvent The in event. * @param {MSPointerEvent} inEvent The in event.
*/ */
function msPointerOut(inEvent) { function msPointerOut(inEvent) {
@@ -95,7 +95,7 @@ function msPointerOut(inEvent) {
/** /**
* Handler for `msPointerOver`. * Handler for `msPointerOver`.
* *
* @this {import("./MsSource.js").default} * @this {MsSource}
* @param {MSPointerEvent} inEvent The in event. * @param {MSPointerEvent} inEvent The in event.
*/ */
function msPointerOver(inEvent) { function msPointerOver(inEvent) {
@@ -106,7 +106,7 @@ function msPointerOver(inEvent) {
/** /**
* Handler for `msPointerCancel`. * Handler for `msPointerCancel`.
* *
* @this {import("./MsSource.js").default} * @this {MsSource}
* @param {MSPointerEvent} inEvent The in event. * @param {MSPointerEvent} inEvent The in event.
*/ */
function msPointerCancel(inEvent) { function msPointerCancel(inEvent) {
@@ -118,7 +118,7 @@ function msPointerCancel(inEvent) {
/** /**
* Handler for `msLostPointerCapture`. * Handler for `msLostPointerCapture`.
* *
* @this {import("./MsSource.js").default} * @this {MsSource}
* @param {MSPointerEvent} inEvent The in event. * @param {MSPointerEvent} inEvent The in event.
*/ */
function msLostPointerCapture(inEvent) { function msLostPointerCapture(inEvent) {
@@ -129,7 +129,7 @@ function msLostPointerCapture(inEvent) {
/** /**
* Handler for `msGotPointerCapture`. * Handler for `msGotPointerCapture`.
* *
* @this {import("./MsSource.js").default} * @this {MsSource}
* @param {MSPointerEvent} inEvent The in event. * @param {MSPointerEvent} inEvent The in event.
*/ */
function msGotPointerCapture(inEvent) { function msGotPointerCapture(inEvent) {
+8 -8
View File
@@ -37,7 +37,7 @@ import EventSource from '../pointer/EventSource.js';
/** /**
* Handler for `pointerdown`. * Handler for `pointerdown`.
* *
* @this {import("./NativeSource.js").default} * @this {NativeSource}
* @param {Event} inEvent The in event. * @param {Event} inEvent The in event.
*/ */
function pointerDown(inEvent) { function pointerDown(inEvent) {
@@ -47,7 +47,7 @@ function pointerDown(inEvent) {
/** /**
* Handler for `pointermove`. * Handler for `pointermove`.
* *
* @this {import("./NativeSource.js").default} * @this {NativeSource}
* @param {Event} inEvent The in event. * @param {Event} inEvent The in event.
*/ */
function pointerMove(inEvent) { function pointerMove(inEvent) {
@@ -57,7 +57,7 @@ function pointerMove(inEvent) {
/** /**
* Handler for `pointerup`. * Handler for `pointerup`.
* *
* @this {import("./NativeSource.js").default} * @this {NativeSource}
* @param {Event} inEvent The in event. * @param {Event} inEvent The in event.
*/ */
function pointerUp(inEvent) { function pointerUp(inEvent) {
@@ -67,7 +67,7 @@ function pointerUp(inEvent) {
/** /**
* Handler for `pointerout`. * Handler for `pointerout`.
* *
* @this {import("./NativeSource.js").default} * @this {NativeSource}
* @param {Event} inEvent The in event. * @param {Event} inEvent The in event.
*/ */
function pointerOut(inEvent) { function pointerOut(inEvent) {
@@ -77,7 +77,7 @@ function pointerOut(inEvent) {
/** /**
* Handler for `pointerover`. * Handler for `pointerover`.
* *
* @this {import("./NativeSource.js").default} * @this {NativeSource}
* @param {Event} inEvent The in event. * @param {Event} inEvent The in event.
*/ */
function pointerOver(inEvent) { function pointerOver(inEvent) {
@@ -87,7 +87,7 @@ function pointerOver(inEvent) {
/** /**
* Handler for `pointercancel`. * Handler for `pointercancel`.
* *
* @this {import("./NativeSource.js").default} * @this {NativeSource}
* @param {Event} inEvent The in event. * @param {Event} inEvent The in event.
*/ */
function pointerCancel(inEvent) { function pointerCancel(inEvent) {
@@ -97,7 +97,7 @@ function pointerCancel(inEvent) {
/** /**
* Handler for `lostpointercapture`. * Handler for `lostpointercapture`.
* *
* @this {import("./NativeSource.js").default} * @this {NativeSource}
* @param {Event} inEvent The in event. * @param {Event} inEvent The in event.
*/ */
function lostPointerCapture(inEvent) { function lostPointerCapture(inEvent) {
@@ -107,7 +107,7 @@ function lostPointerCapture(inEvent) {
/** /**
* Handler for `gotpointercapture`. * Handler for `gotpointercapture`.
* *
* @this {import("./NativeSource.js").default} * @this {NativeSource}
* @param {Event} inEvent The in event. * @param {Event} inEvent The in event.
*/ */
function gotPointerCapture(inEvent) { function gotPointerCapture(inEvent) {
+4 -4
View File
@@ -51,7 +51,7 @@ const POINTER_TYPE = 'touch';
* Handler for `touchstart`, triggers `pointerover`, * Handler for `touchstart`, triggers `pointerover`,
* `pointerenter` and `pointerdown` events. * `pointerenter` and `pointerdown` events.
* *
* @this {import("./TouchSource.js").default} * @this {TouchSource}
* @param {TouchEvent} inEvent The in event. * @param {TouchEvent} inEvent The in event.
*/ */
function touchstart(inEvent) { function touchstart(inEvent) {
@@ -65,7 +65,7 @@ function touchstart(inEvent) {
/** /**
* Handler for `touchmove`. * Handler for `touchmove`.
* *
* @this {import("./TouchSource.js").default} * @this {TouchSource}
* @param {TouchEvent} inEvent The in event. * @param {TouchEvent} inEvent The in event.
*/ */
function touchmove(inEvent) { function touchmove(inEvent) {
@@ -76,7 +76,7 @@ function touchmove(inEvent) {
* Handler for `touchend`, triggers `pointerup`, * Handler for `touchend`, triggers `pointerup`,
* `pointerout` and `pointerleave` events. * `pointerout` and `pointerleave` events.
* *
* @this {import("./TouchSource.js").default} * @this {TouchSource}
* @param {TouchEvent} inEvent The event. * @param {TouchEvent} inEvent The event.
*/ */
function touchend(inEvent) { function touchend(inEvent) {
@@ -88,7 +88,7 @@ function touchend(inEvent) {
* Handler for `touchcancel`, triggers `pointercancel`, * Handler for `touchcancel`, triggers `pointercancel`,
* `pointerout` and `pointerleave` events. * `pointerout` and `pointerleave` events.
* *
* @this {import("./TouchSource.js").default} * @this {TouchSource}
* @param {TouchEvent} inEvent The in event. * @param {TouchEvent} inEvent The in event.
*/ */
function touchcancel(inEvent) { function touchcancel(inEvent) {
+1 -1
View File
@@ -20,7 +20,7 @@ const Units = {
/** /**
* Meters per unit lookup table. * Meters per unit lookup table.
* @const * @const
* @type {Object<import("./Units.js").default, number>} * @type {Object<Units, number>}
* @api * @api
*/ */
export const METERS_PER_UNIT = {}; export const METERS_PER_UNIT = {};
+2 -2
View File
@@ -185,7 +185,7 @@ class RenderFeature {
/** /**
* For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when
* determining the geometry type in style function (see {@link #getType}). * determining the geometry type in style function (see {@link #getType}).
* @return {import("./Feature.js").default} Feature. * @return {RenderFeature} Feature.
* @api * @api
*/ */
getGeometry() { getGeometry() {
@@ -257,7 +257,7 @@ RenderFeature.prototype.getFlatCoordinates =
/** /**
* Get the feature for working with its geometry. * Get the feature for working with its geometry.
* @return {import("./Feature.js").default} Feature. * @return {RenderFeature} Feature.
*/ */
RenderFeature.prototype.getSimplifiedGeometry = RenderFeature.prototype.getSimplifiedGeometry =
RenderFeature.prototype.getGeometry; RenderFeature.prototype.getGeometry;
+2 -2
View File
@@ -1002,7 +1002,7 @@ class CanvasReplay extends VectorContext {
/** /**
* @param {import("../canvas.js").FillStrokeState} state State. * @param {import("../canvas.js").FillStrokeState} state State.
* @param {function(this:import("./Replay.js").default, import("../canvas.js").FillStrokeState, (import("../../geom/Geometry.js").default|import("../Feature.js").default)):Array<*>} createFill Create fill. * @param {function(this:CanvasReplay, import("../canvas.js").FillStrokeState, (import("../../geom/Geometry.js").default|import("../Feature.js").default)):Array<*>} createFill Create fill.
* @param {import("../../geom/Geometry.js").default|import("../Feature.js").default} geometry Geometry. * @param {import("../../geom/Geometry.js").default|import("../Feature.js").default} geometry Geometry.
*/ */
updateFillStyle(state, createFill, geometry) { updateFillStyle(state, createFill, geometry) {
@@ -1017,7 +1017,7 @@ class CanvasReplay extends VectorContext {
/** /**
* @param {import("../canvas.js").FillStrokeState} state State. * @param {import("../canvas.js").FillStrokeState} state State.
* @param {function(this:import("./Replay.js").default, import("../canvas.js").FillStrokeState)} applyStroke Apply stroke. * @param {function(this:CanvasReplay, import("../canvas.js").FillStrokeState)} applyStroke Apply stroke.
*/ */
updateStrokeStyle(state, applyStroke) { updateStrokeStyle(state, applyStroke) {
const strokeStyle = state.strokeStyle; const strokeStyle = state.strokeStyle;
+1 -1
View File
@@ -206,7 +206,7 @@ CanvasImageLayerRenderer['handles'] = function(layer) {
* Create a layer renderer. * Create a layer renderer.
* @param {import("../Map.js").default} mapRenderer The map renderer. * @param {import("../Map.js").default} mapRenderer The map renderer.
* @param {import("../../layer/Layer.js").default} layer The layer to be rendererd. * @param {import("../../layer/Layer.js").default} layer The layer to be rendererd.
* @return {import("./ImageLayer.js").default} The layer renderer. * @return {CanvasImageLayerRenderer} The layer renderer.
*/ */
CanvasImageLayerRenderer['create'] = function(mapRenderer, layer) { CanvasImageLayerRenderer['create'] = function(mapRenderer, layer) {
return new CanvasImageLayerRenderer(/** @type {import("../../layer/Image.js").default} */ (layer)); return new CanvasImageLayerRenderer(/** @type {import("../../layer/Image.js").default} */ (layer));
+1 -1
View File
@@ -370,7 +370,7 @@ CanvasTileLayerRenderer['handles'] = function(layer) {
* Create a layer renderer. * Create a layer renderer.
* @param {import("../Map.js").default} mapRenderer The map renderer. * @param {import("../Map.js").default} mapRenderer The map renderer.
* @param {import("../../layer/Layer.js").default} layer The layer to be rendererd. * @param {import("../../layer/Layer.js").default} layer The layer to be rendererd.
* @return {import("./TileLayer.js").default} The layer renderer. * @return {CanvasTileLayerRenderer} The layer renderer.
*/ */
CanvasTileLayerRenderer['create'] = function(mapRenderer, layer) { CanvasTileLayerRenderer['create'] = function(mapRenderer, layer) {
return new CanvasTileLayerRenderer(/** @type {import("../../layer/Tile.js").default} */ (layer)); return new CanvasTileLayerRenderer(/** @type {import("../../layer/Tile.js").default} */ (layer));
+2 -2
View File
@@ -339,7 +339,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
vectorSource.loadFeatures(extent, resolution, projection); vectorSource.loadFeatures(extent, resolution, projection);
/** /**
* @param {import("../../Feature.js").default} feature Feature. * @param {import("../../Feature.js").default} feature Feature.
* @this {import("./VectorLayer.js").default} * @this {CanvasVectorLayerRenderer}
*/ */
const render = function(feature) { const render = function(feature) {
let styles; let styles;
@@ -427,7 +427,7 @@ CanvasVectorLayerRenderer['handles'] = function(layer) {
* Create a layer renderer. * Create a layer renderer.
* @param {import("../Map.js").default} mapRenderer The map renderer. * @param {import("../Map.js").default} mapRenderer The map renderer.
* @param {import("../../layer/Layer.js").default} layer The layer to be rendererd. * @param {import("../../layer/Layer.js").default} layer The layer to be rendererd.
* @return {import("./VectorLayer.js").default} The layer renderer. * @return {CanvasVectorLayerRenderer} The layer renderer.
*/ */
CanvasVectorLayerRenderer['create'] = function(mapRenderer, layer) { CanvasVectorLayerRenderer['create'] = function(mapRenderer, layer) {
return new CanvasVectorLayerRenderer(/** @type {import("../../layer/Vector.js").default} */ (layer)); return new CanvasVectorLayerRenderer(/** @type {import("../../layer/Vector.js").default} */ (layer));
+2 -2
View File
@@ -183,7 +183,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
/** /**
* @param {import("../../Feature.js").default|import("../../render/Feature.js").default} feature Feature. * @param {import("../../Feature.js").default|import("../../render/Feature.js").default} feature Feature.
* @this {import("./VectorTileLayer.js").default} * @this {CanvasVectorTileLayerRenderer}
*/ */
const render = function(feature) { const render = function(feature) {
let styles; let styles;
@@ -490,7 +490,7 @@ CanvasVectorTileLayerRenderer['handles'] = function(layer) {
* Create a layer renderer. * Create a layer renderer.
* @param {import("../Map.js").default} mapRenderer The map renderer. * @param {import("../Map.js").default} mapRenderer The map renderer.
* @param {import("../../layer/Layer.js").default} layer The layer to be rendererd. * @param {import("../../layer/Layer.js").default} layer The layer to be rendererd.
* @return {import("./VectorTileLayer.js").default} The layer renderer. * @return {CanvasVectorTileLayerRenderer} The layer renderer.
*/ */
CanvasVectorTileLayerRenderer['create'] = function(mapRenderer, layer) { CanvasVectorTileLayerRenderer['create'] = function(mapRenderer, layer) {
return new CanvasVectorTileLayerRenderer(/** @type {import("../../layer/VectorTile.js").default} */ (layer)); return new CanvasVectorTileLayerRenderer(/** @type {import("../../layer/VectorTile.js").default} */ (layer));
+1 -1
View File
@@ -327,7 +327,7 @@ WebGLImageLayerRenderer['handles'] = function(layer) {
* Create a layer renderer. * Create a layer renderer.
* @param {import("../Map.js").default} mapRenderer The map renderer. * @param {import("../Map.js").default} mapRenderer The map renderer.
* @param {import("../../layer/Layer.js").default} layer The layer to be rendererd. * @param {import("../../layer/Layer.js").default} layer The layer to be rendererd.
* @return {import("./ImageLayer.js").default} The layer renderer. * @return {WebGLImageLayerRenderer} The layer renderer.
*/ */
WebGLImageLayerRenderer['create'] = function(mapRenderer, layer) { WebGLImageLayerRenderer['create'] = function(mapRenderer, layer) {
return new WebGLImageLayerRenderer( return new WebGLImageLayerRenderer(
+2 -2
View File
@@ -131,7 +131,7 @@ class WebGLMapRenderer extends MapRenderer {
/** /**
* @param {Array<*>} element Element. * @param {Array<*>} element Element.
* @return {number} Priority. * @return {number} Priority.
* @this {import("./Map.js").default} * @this {WebGLMapRenderer}
*/ */
(function(element) { (function(element) {
const tileCenter = /** @type {import("../../coordinate.js").Coordinate} */ (element[1]); const tileCenter = /** @type {import("../../coordinate.js").Coordinate} */ (element[1]);
@@ -156,7 +156,7 @@ class WebGLMapRenderer extends MapRenderer {
* @param {import("../../PluggableMap.js").default} map Map. * @param {import("../../PluggableMap.js").default} map Map.
* @param {?import("../../PluggableMap.js").FrameState} frameState Frame state. * @param {?import("../../PluggableMap.js").FrameState} frameState Frame state.
* @return {boolean} false. * @return {boolean} false.
* @this {import("./Map.js").default} * @this {WebGLMapRenderer}
*/ */
this.loadNextTileTexture_ = this.loadNextTileTexture_ =
function(map, frameState) { function(map, frameState) {
+1 -1
View File
@@ -399,7 +399,7 @@ WebGLTileLayerRenderer['handles'] = function(layer) {
* Create a layer renderer. * Create a layer renderer.
* @param {import("../Map.js").default} mapRenderer The map renderer. * @param {import("../Map.js").default} mapRenderer The map renderer.
* @param {import("../../layer/Layer.js").default} layer The layer to be rendererd. * @param {import("../../layer/Layer.js").default} layer The layer to be rendererd.
* @return {import("./TileLayer.js").default} The layer renderer. * @return {WebGLTileLayerRenderer} The layer renderer.
*/ */
WebGLTileLayerRenderer['create'] = function(mapRenderer, layer) { WebGLTileLayerRenderer['create'] = function(mapRenderer, layer) {
return new WebGLTileLayerRenderer( return new WebGLTileLayerRenderer(
+2 -2
View File
@@ -232,7 +232,7 @@ class WebGLVectorLayerRenderer extends WebGLLayerRenderer {
vectorSource.loadFeatures(extent, resolution, projection); vectorSource.loadFeatures(extent, resolution, projection);
/** /**
* @param {import("../../Feature.js").default} feature Feature. * @param {import("../../Feature.js").default} feature Feature.
* @this {import("./VectorLayer.js").default} * @this {WebGLVectorLayerRenderer}
*/ */
const render = function(feature) { const render = function(feature) {
let styles; let styles;
@@ -318,7 +318,7 @@ WebGLVectorLayerRenderer['handles'] = function(layer) {
* Create a layer renderer. * Create a layer renderer.
* @param {import("../Map.js").default} mapRenderer The map renderer. * @param {import("../Map.js").default} mapRenderer The map renderer.
* @param {import("../../layer/Layer.js").default} layer The layer to be rendererd. * @param {import("../../layer/Layer.js").default} layer The layer to be rendererd.
* @return {import("./VectorLayer.js").default} The layer renderer. * @return {WebGLVectorLayerRenderer} The layer renderer.
*/ */
WebGLVectorLayerRenderer['create'] = function(mapRenderer, layer) { WebGLVectorLayerRenderer['create'] = function(mapRenderer, layer) {
return new WebGLVectorLayerRenderer( return new WebGLVectorLayerRenderer(
+1 -1
View File
@@ -460,7 +460,7 @@ export function optionsFromCapabilities(wmtsCap, config) {
/** /**
* @param {string} template Template. * @param {string} template Template.
* @return {import("../Tile.js").UrlFunction} Tile URL function. * @return {import("../Tile.js").UrlFunction} Tile URL function.
* @this {import("./WMTS.js").default} * @this {WMTS}
*/ */
function createFromWMTSTemplate(template) { function createFromWMTSTemplate(template) {
const requestEncoding = this.requestEncoding_; const requestEncoding = this.requestEncoding_;
+1 -1
View File
@@ -96,7 +96,7 @@ class LRUCache extends EventTarget {
/** /**
* @param {function(this: S, T, string, import("./LRUCache.js").default): ?} f The function * @param {function(this: S, T, string, LRUCache): ?} f The function
* to call for every entry from the oldest to the newer. This function takes * to call for every entry from the oldest to the newer. This function takes
* 3 arguments (the entry value, the entry key and the LRUCache object). * 3 arguments (the entry value, the entry key and the LRUCache object).
* The return value is ignored. * The return value is ignored.
+1 -1
View File
@@ -227,7 +227,7 @@ class LinkedList {
/** /**
* Concatenates two lists. * Concatenates two lists.
* @param {import("./LinkedList.js").default} list List to merge into the current list. * @param {LinkedList} list List to merge into the current list.
*/ */
concat(list) { concat(list) {
if (list.head_) { if (list.head_) {
+1 -1
View File
@@ -228,7 +228,7 @@ class RBush {
/** /**
* @param {import("./RBush.js").default} rbush R-Tree. * @param {RBush} rbush R-Tree.
*/ */
concat(rbush) { concat(rbush) {
this.rbush_.load(rbush.rbush_.all()); this.rbush_.load(rbush.rbush_.all());
+1 -1
View File
@@ -41,7 +41,7 @@ class CircleStyle extends RegularShape {
/** /**
* Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too. * Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too.
* @return {import("./Circle.js").default} The cloned style. * @return {CircleStyle} The cloned style.
* @override * @override
* @api * @api
*/ */
+1 -1
View File
@@ -41,7 +41,7 @@ class Fill {
/** /**
* Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}. * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}.
* @return {import("./Fill.js").default} The cloned style. * @return {Fill} The cloned style.
* @api * @api
*/ */
clone() { clone() {
+1 -1
View File
@@ -202,7 +202,7 @@ class Icon extends ImageStyle {
/** /**
* Clones the style. The underlying Image/HTMLCanvasElement is not cloned. * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.
* @return {import("./Icon.js").default} The cloned style. * @return {Icon} The cloned style.
* @api * @api
*/ */
clone() { clone() {
+1 -1
View File
@@ -247,7 +247,7 @@ class IconImage extends EventTarget {
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {import("../ImageState.js").default} imageState Image state. * @param {import("../ImageState.js").default} imageState Image state.
* @param {import("../color.js").Color} color Color. * @param {import("../color.js").Color} color Color.
* @return {import("./IconImage.js").default} Icon image. * @return {IconImage} Icon image.
*/ */
export function get(image, src, size, crossOrigin, imageState, color) { export function get(image, src, size, crossOrigin, imageState, color) {
let iconImage = iconImageCache.get(src, crossOrigin, color); let iconImage = iconImageCache.get(src, crossOrigin, color);
+1 -1
View File
@@ -164,7 +164,7 @@ class RegularShape extends ImageStyle {
/** /**
* Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too. * Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too.
* @return {import("./RegularShape.js").default} The cloned style. * @return {RegularShape} The cloned style.
* @api * @api
*/ */
clone() { clone() {
+1 -1
View File
@@ -87,7 +87,7 @@ class Stroke {
/** /**
* Clones the style. * Clones the style.
* @return {import("./Stroke.js").default} The cloned style. * @return {Stroke} The cloned style.
* @api * @api
*/ */
clone() { clone() {
+9 -9
View File
@@ -100,7 +100,7 @@ import Stroke from '../style/Stroke.js';
* vector layer can be styled. * vector layer can be styled.
* *
* @typedef {function((import("../Feature.js").default|import("../render/Feature.js").default), number): * @typedef {function((import("../Feature.js").default|import("../render/Feature.js").default), number):
* (import("./Style.js").default|Array<import("./Style.js").default>)} StyleFunction * (Style|Array<Style>)} StyleFunction
*/ */
@@ -209,7 +209,7 @@ class Style {
/** /**
* Clones the style. * Clones the style.
* @return {import("./Style.js").default} The cloned style. * @return {Style} The cloned style.
* @api * @api
*/ */
clone() { clone() {
@@ -392,9 +392,9 @@ class Style {
/** /**
* Convert the provided object into a style function. Functions passed through * Convert the provided object into a style function. Functions passed through
* unchanged. Arrays of import("./Style.js").default or single style objects wrapped in a * unchanged. Arrays of Style or single style objects wrapped in a
* new style function. * new style function.
* @param {StyleFunction|Array<import("./Style.js").default>|import("./Style.js").default} obj * @param {StyleFunction|Array<Style>|Style} obj
* A style function, a single style, or an array of styles. * A style function, a single style, or an array of styles.
* @return {StyleFunction} A style function. * @return {StyleFunction} A style function.
*/ */
@@ -405,7 +405,7 @@ export function toFunction(obj) {
styleFunction = obj; styleFunction = obj;
} else { } else {
/** /**
* @type {Array<import("./Style.js").default>} * @type {Array<Style>}
*/ */
let styles; let styles;
if (Array.isArray(obj)) { if (Array.isArray(obj)) {
@@ -424,7 +424,7 @@ export function toFunction(obj) {
/** /**
* @type {Array<import("./Style.js").default>} * @type {Array<Style>}
*/ */
let defaultStyles = null; let defaultStyles = null;
@@ -432,7 +432,7 @@ let defaultStyles = null;
/** /**
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @return {Array<import("./Style.js").default>} Style. * @return {Array<Style>} Style.
*/ */
export function createDefaultStyle(feature, resolution) { export function createDefaultStyle(feature, resolution) {
// We don't use an immediately-invoked function // We don't use an immediately-invoked function
@@ -466,10 +466,10 @@ export function createDefaultStyle(feature, resolution) {
/** /**
* Default styles for editing features. * Default styles for editing features.
* @return {Object<import("../geom/GeometryType.js").default, Array<import("./Style.js").default>>} Styles * @return {Object<import("../geom/GeometryType.js").default, Array<Style>>} Styles
*/ */
export function createEditingStyle() { export function createEditingStyle() {
/** @type {Object<import("../geom/GeometryType.js").default, Array<import("./Style.js").default>>} */ /** @type {Object<import("../geom/GeometryType.js").default, Array<Style>>} */
const styles = {}; const styles = {};
const white = [255, 255, 255, 1]; const white = [255, 255, 255, 1];
const blue = [0, 153, 255, 1]; const blue = [0, 153, 255, 1];
+1 -1
View File
@@ -164,7 +164,7 @@ class Text {
/** /**
* Clones the style. * Clones the style.
* @return {import("./Text.js").default} The cloned style. * @return {Text} The cloned style.
* @api * @api
*/ */
clone() { clone() {
+1 -1
View File
@@ -102,7 +102,7 @@ export default WMTSTileGrid;
* ranges the server provides. * ranges the server provides.
* @param {Array<Object>=} opt_matrixLimits An optional object representing * @param {Array<Object>=} opt_matrixLimits An optional object representing
* the available matrices for tileGrid. * the available matrices for tileGrid.
* @return {import("./WMTS.js").default} WMTS tileGrid instance. * @return {WMTSTileGrid} WMTS tileGrid instance.
* @api * @api
*/ */
export function createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits) { export function createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits) {