From b0f20d6bd60089a1be2e4fb9a3a1f04f8683c877 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 5 Apr 2020 08:54:32 +0200 Subject: [PATCH] Use imports for enum types --- src/ol/Collection.js | 2 +- src/ol/Image.js | 2 +- src/ol/ImageTile.js | 2 +- src/ol/Overlay.js | 10 +++++----- src/ol/Tile.js | 8 ++++---- src/ol/VectorTile.js | 2 +- src/ol/View.js | 2 +- src/ol/control/ScaleLine.js | 6 +++--- src/ol/extent.js | 4 ++-- src/ol/format/GPX.js | 2 +- src/ol/format/KML.js | 12 ++++++------ src/ol/format/MVT.js | 4 ++-- src/ol/format/Polyline.js | 2 +- src/ol/format/WKT.js | 6 +++--- src/ol/geom/LineString.js | 4 ++-- src/ol/geom/LinearRing.js | 4 ++-- src/ol/geom/MultiLineString.js | 2 +- src/ol/geom/MultiPolygon.js | 4 ++-- src/ol/geom/Polygon.js | 4 ++-- src/ol/geom/SimpleGeometry.js | 16 ++++++++-------- src/ol/interaction/Draw.js | 8 ++++---- src/ol/layer/Layer.js | 2 +- src/ol/layer/VectorTile.js | 4 ++-- src/ol/proj.js | 2 +- src/ol/render/Feature.js | 6 +++--- src/ol/render/canvas/Builder.js | 2 +- src/ol/render/canvas/Executor.js | 2 +- src/ol/render/canvas/ExecutorGroup.js | 12 ++++++------ src/ol/source/IIIF.js | 2 +- src/ol/source/Source.js | 8 ++++---- src/ol/source/UTFGrid.js | 2 +- src/ol/source/Zoomify.js | 2 +- src/ol/tilegrid.js | 4 ++-- 33 files changed, 77 insertions(+), 77 deletions(-) diff --git a/src/ol/Collection.js b/src/ol/Collection.js index d2b90afb04..ab11627c3b 100644 --- a/src/ol/Collection.js +++ b/src/ol/Collection.js @@ -21,7 +21,7 @@ const Property = { */ export class CollectionEvent extends Event { /** - * @param {CollectionEventType} type Type. + * @param {import("./CollectionEventType.js").default} type Type. * @param {*=} opt_element Element. * @param {number=} opt_index The index of the added or removed element. */ diff --git a/src/ol/Image.js b/src/ol/Image.js index a40663eb44..66602f03cb 100644 --- a/src/ol/Image.js +++ b/src/ol/Image.js @@ -68,7 +68,7 @@ class ImageWrapper extends ImageBase { /** * @protected - * @type {ImageState} + * @type {import("./ImageState.js").default} */ this.state = ImageState.IDLE; diff --git a/src/ol/ImageTile.js b/src/ol/ImageTile.js index 34f37b9f46..d636ef73c4 100644 --- a/src/ol/ImageTile.js +++ b/src/ol/ImageTile.js @@ -9,7 +9,7 @@ import {listenImage} from './Image.js'; class ImageTile extends Tile { /** * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. - * @param {TileState} state State. + * @param {import("./TileState.js").default} state State. * @param {string} src Image source URI. * @param {?string} crossOrigin Cross origin. * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index a4d7d22766..ab3e4b8300 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -21,7 +21,7 @@ import {outerHeight, outerWidth, removeChildren, removeNode} from './dom.js'; * shifts the overlay down. * @property {import("./coordinate.js").Coordinate} [position] The overlay position * in map projection. - * @property {OverlayPositioning} [positioning='top-left'] Defines how + * @property {import("./OverlayPositioning.js").default} [positioning='top-left'] Defines how * the overlay is actually positioned with respect to its `position` property. * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`, * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`, @@ -204,7 +204,7 @@ class Overlay extends BaseObject { this.setPositioning( options.positioning !== undefined - ? /** @type {OverlayPositioning} */ (options.positioning) + ? /** @type {import("./OverlayPositioning.js").default} */ (options.positioning) : OverlayPositioning.TOP_LEFT ); @@ -270,13 +270,13 @@ class Overlay extends BaseObject { /** * Get the current positioning of this overlay. - * @return {OverlayPositioning} How the overlay is positioned + * @return {import("./OverlayPositioning.js").default} How the overlay is positioned * relative to its point on the map. * @observable * @api */ getPositioning() { - return /** @type {OverlayPositioning} */ (this.get(Property.POSITIONING)); + return /** @type {import("./OverlayPositioning.js").default} */ (this.get(Property.POSITIONING)); } /** @@ -481,7 +481,7 @@ class Overlay extends BaseObject { /** * Set the positioning for this overlay. - * @param {OverlayPositioning} positioning how the overlay is + * @param {import("./OverlayPositioning.js").default} positioning how the overlay is * positioned relative to its point on the map. * @observable * @api diff --git a/src/ol/Tile.js b/src/ol/Tile.js index 2aa8bf6144..e1fb33d809 100644 --- a/src/ol/Tile.js +++ b/src/ol/Tile.js @@ -75,7 +75,7 @@ import {easeIn} from './easing.js'; class Tile extends EventTarget { /** * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. - * @param {TileState} state State. + * @param {import("./TileState.js").default} state State. * @param {Options=} opt_options Tile options. */ constructor(tileCoord, state, opt_options) { @@ -90,7 +90,7 @@ class Tile extends EventTarget { /** * @protected - * @type {TileState} + * @type {import("./TileState.js").default} */ this.state = state; @@ -227,7 +227,7 @@ class Tile extends EventTarget { } /** - * @return {TileState} State. + * @return {import("./TileState.js").default} State. */ getState() { return this.state; @@ -238,7 +238,7 @@ class Tile extends EventTarget { * it is important to set the state correctly to {@link module:ol/TileState~ERROR} * when the tile cannot be loaded. Otherwise the tile cannot be removed from * the tile queue and will block other requests. - * @param {TileState} state State. + * @param {import("./TileState.js").default} state State. * @api */ setState(state) { diff --git a/src/ol/VectorTile.js b/src/ol/VectorTile.js index 8aa1ab501a..fb2e63605f 100644 --- a/src/ol/VectorTile.js +++ b/src/ol/VectorTile.js @@ -7,7 +7,7 @@ import TileState from './TileState.js'; class VectorTile extends Tile { /** * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. - * @param {TileState} state State. + * @param {import("./TileState.js").default} state State. * @param {string} src Data source url. * @param {import("./format/Feature.js").default} format Feature format. * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. diff --git a/src/ol/View.js b/src/ol/View.js index 107d5660dd..c1e189d9f1 100644 --- a/src/ol/View.js +++ b/src/ol/View.js @@ -1481,7 +1481,7 @@ class View extends BaseObject { } /** - * @param {ViewHint} hint Hint. + * @param {import("./ViewHint.js").default} hint Hint. * @param {number} delta Delta. * @return {number} New value. */ diff --git a/src/ol/control/ScaleLine.js b/src/ol/control/ScaleLine.js index 25e71be508..e43ec16503 100644 --- a/src/ol/control/ScaleLine.js +++ b/src/ol/control/ScaleLine.js @@ -47,7 +47,7 @@ const DEFAULT_DPI = 25.4 / 0.28; * should be re-rendered. This is called in a `requestAnimationFrame` callback. * @property {HTMLElement|string} [target] Specify a target if you want the control * to be rendered outside of the map's viewport. - * @property {Units|string} [units='metric'] Units. + * @property {import("./ScaleLine.js").Units|string} [units='metric'] Units. * @property {boolean} [bar=false] Render scalebars instead of a line. * @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers * for best results. Only applies when `bar` is `true`. @@ -165,7 +165,7 @@ class ScaleLine extends Control { /** * Return the units to use in the scale line. - * @return {Units} The units + * @return {import("./ScaleLine.js").Units} The units * to use in the scale line. * @observable * @api @@ -183,7 +183,7 @@ class ScaleLine extends Control { /** * Set the units to use in the scale line. - * @param {Units} units The units to use in the scale line. + * @param {import("./ScaleLine.js").Units} units The units to use in the scale line. * @observable * @api */ diff --git a/src/ol/extent.js b/src/ol/extent.js index 80e3bc5ba9..0a8f5225e2 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -160,7 +160,7 @@ export function containsXY(extent, x, y) { * Get the relationship between a coordinate and extent. * @param {Extent} extent The extent. * @param {import("./coordinate.js").Coordinate} coordinate The coordinate. - * @return {Relationship} The relationship (bitwise compare with + * @return {import("./extent/Relationship.js").default} The relationship (bitwise compare with * import("./extent/Relationship.js").Relationship). */ export function coordinateRelationship(extent, coordinate) { @@ -484,7 +484,7 @@ export function getCenter(extent) { /** * Get a corner coordinate of an extent. * @param {Extent} extent Extent. - * @param {Corner} corner Corner. + * @param {import("./extent/Corner.js").default} corner Corner. * @return {import("./coordinate.js").Coordinate} Corner coordinate. */ export function getCorner(extent, corner) { diff --git a/src/ol/format/GPX.js b/src/ol/format/GPX.js index 3db998d284..5a14180d5b 100644 --- a/src/ol/format/GPX.js +++ b/src/ol/format/GPX.js @@ -558,7 +558,7 @@ function appendCoordinate(flatCoordinates, layoutOptions, node, values) { * @param {LayoutOptions} layoutOptions Layout options. * @param {Array} flatCoordinates Flat coordinates. * @param {Array=} ends Ends. - * @return {GeometryLayout} Layout. + * @return {import("../geom/GeometryLayout.js").default} Layout. */ function applyLayoutOptions(layoutOptions, flatCoordinates, ends) { let layout = GeometryLayout.XY; diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index e535f14281..9b9f2b9fc8 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -57,10 +57,10 @@ import {transformGeometryWithOptions} from './Feature.js'; /** * @typedef {Object} Vec2 * @property {number} x - * @property {IconAnchorUnits} xunits + * @property {import("../style/IconAnchorUnits").default} xunits * @property {number} y - * @property {IconAnchorUnits} yunits - * @property {IconOrigin} origin + * @property {import("../style/IconAnchorUnits").default} yunits + * @property {import("../style/IconOrigin.js").default} origin */ /** @@ -96,7 +96,7 @@ const SCHEMA_LOCATION = 'https://developers.google.com/kml/schema/kml22gx.xsd'; /** - * @type {Object} + * @type {Object} */ const ICON_ANCHOR_UNITS_MAP = { 'fraction': IconAnchorUnits.FRACTION, @@ -212,12 +212,12 @@ export function getDefaultFillStyle() { let DEFAULT_IMAGE_STYLE_ANCHOR; /** - * @type {IconAnchorUnits} + * @type {import("../style/IconAnchorUnits").default} */ let DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS; /** - * @type {IconAnchorUnits} + * @type {import("../style/IconAnchorUnits").default} */ let DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS; diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index f88a007a22..69350830d4 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -421,10 +421,10 @@ function readRawFeature(pbf, layer, i) { * @param {number} type The raw feature's geometry type * @param {number} numEnds Number of ends of the flat coordinates of the * geometry. - * @return {GeometryType} The geometry type. + * @return {import("../geom/GeometryType.js").default} The geometry type. */ function getGeometryType(type, numEnds) { - /** @type {GeometryType} */ + /** @type {import("../geom/GeometryType.js").default} */ let geometryType; if (type === 1) { geometryType = diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index 24ede3b21a..e19e722d44 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -55,7 +55,7 @@ class Polyline extends TextFeature { /** * @private - * @type {GeometryLayout} + * @type {import("../geom/GeometryLayout").default} */ this.geometryLayout_ = options.geometryLayout ? options.geometryLayout diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index da3a658748..6f91b1e2bc 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -16,7 +16,7 @@ import {transformGeometryWithOptions} from './Feature.js'; /** * Geometry constructors - * @enum {function (new:import("../geom/Geometry.js").default, Array, GeometryLayout)} + * @enum {function (new:import("../geom/Geometry.js").default, Array, import("../geom/GeometryLayout.js").default)} */ const GeometryConstructor = { 'POINT': Point, @@ -241,7 +241,7 @@ class Parser { this.token_; /** - * @type {GeometryLayout} + * @type {import("../geom/GeometryLayout.js").default} * @private */ this.layout_ = GeometryLayout.XY; @@ -290,7 +290,7 @@ class Parser { /** * Try to parse the dimensional info. - * @return {GeometryLayout} The layout. + * @return {import("../geom/GeometryLayout.js").default} The layout. * @private */ parseGeometryLayout_() { diff --git a/src/ol/geom/LineString.js b/src/ol/geom/LineString.js index 9b7c07c40c..51c6e35b21 100644 --- a/src/ol/geom/LineString.js +++ b/src/ol/geom/LineString.js @@ -25,7 +25,7 @@ class LineString extends SimpleGeometry { /** * @param {Array|Array} coordinates Coordinates. * For internal use, flat coordinates in combination with `opt_layout` are also accepted. - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. */ constructor(coordinates, opt_layout) { super(); @@ -287,7 +287,7 @@ class LineString extends SimpleGeometry { /** * Set the coordinates of the linestring. * @param {!Array} coordinates Coordinates. - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/LinearRing.js b/src/ol/geom/LinearRing.js index ccc3548958..0c4de89059 100644 --- a/src/ol/geom/LinearRing.js +++ b/src/ol/geom/LinearRing.js @@ -22,7 +22,7 @@ class LinearRing extends SimpleGeometry { /** * @param {Array|Array} coordinates Coordinates. * For internal use, flat coordinates in combination with `opt_layout` are also accepted. - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. */ constructor(coordinates, opt_layout) { super(); @@ -167,7 +167,7 @@ class LinearRing extends SimpleGeometry { /** * Set the coordinates of the linear ring. * @param {!Array} coordinates Coordinates. - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/MultiLineString.js b/src/ol/geom/MultiLineString.js index 7559f9c80b..d604195899 100644 --- a/src/ol/geom/MultiLineString.js +++ b/src/ol/geom/MultiLineString.js @@ -28,7 +28,7 @@ class MultiLineString extends SimpleGeometry { * @param {Array|LineString>|Array} coordinates * Coordinates or LineString geometries. (For internal use, flat coordinates in * combination with `opt_layout` and `opt_ends` are also accepted.) - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {Array=} opt_ends Flat coordinate ends for internal use. */ constructor(coordinates, opt_layout, opt_ends) { diff --git a/src/ol/geom/MultiPolygon.js b/src/ol/geom/MultiPolygon.js index d6006ba3d7..3925cd69b5 100644 --- a/src/ol/geom/MultiPolygon.js +++ b/src/ol/geom/MultiPolygon.js @@ -35,7 +35,7 @@ class MultiPolygon extends SimpleGeometry { /** * @param {Array>|Polygon>|Array} coordinates Coordinates. * For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted. - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {Array>=} opt_endss Array of ends for internal use with flat coordinates. */ constructor(coordinates, opt_layout, opt_endss) { @@ -446,7 +446,7 @@ class MultiPolygon extends SimpleGeometry { /** * Set the coordinates of the multipolygon. * @param {!Array>>} coordinates Coordinates. - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/Polygon.js b/src/ol/geom/Polygon.js index a748f83a8e..974340a6e0 100644 --- a/src/ol/geom/Polygon.js +++ b/src/ol/geom/Polygon.js @@ -35,7 +35,7 @@ class Polygon extends SimpleGeometry { * an array of vertices' coordinates where the first coordinate and the last are * equivalent. (For internal use, flat coordinates in combination with * `opt_layout` and `opt_ends` are also accepted.) - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @param {Array=} opt_ends Ends (for internal use with flat coordinates). */ constructor(coordinates, opt_layout, opt_ends) { @@ -385,7 +385,7 @@ class Polygon extends SimpleGeometry { /** * Set the coordinates of the polygon. * @param {!Array>} coordinates Coordinates. - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. * @api */ setCoordinates(coordinates, opt_layout) { diff --git a/src/ol/geom/SimpleGeometry.js b/src/ol/geom/SimpleGeometry.js index cc8e451891..1f8b244694 100644 --- a/src/ol/geom/SimpleGeometry.js +++ b/src/ol/geom/SimpleGeometry.js @@ -21,7 +21,7 @@ class SimpleGeometry extends Geometry { /** * @protected - * @type {GeometryLayout} + * @type {import("./GeometryLayout.js").default} */ this.layout = GeometryLayout.XY; @@ -90,7 +90,7 @@ class SimpleGeometry extends Geometry { /** * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry. - * @return {GeometryLayout} Layout. + * @return {import("./GeometryLayout.js").default} Layout. * @api */ getLayout() { @@ -152,7 +152,7 @@ class SimpleGeometry extends Geometry { } /** - * @param {GeometryLayout} layout Layout. + * @param {import("./GeometryLayout.js").default} layout Layout. * @param {Array} flatCoordinates Flat coordinates. */ setFlatCoordinates(layout, flatCoordinates) { @@ -164,14 +164,14 @@ class SimpleGeometry extends Geometry { /** * @abstract * @param {!Array<*>} coordinates Coordinates. - * @param {GeometryLayout=} opt_layout Layout. + * @param {import("./GeometryLayout.js").default=} opt_layout Layout. */ setCoordinates(coordinates, opt_layout) { abstract(); } /** - * @param {GeometryLayout|undefined} layout Layout. + * @param {import("./GeometryLayout.js").default|undefined} layout Layout. * @param {Array<*>} coordinates Coordinates. * @param {number} nesting Nesting. * @protected @@ -300,7 +300,7 @@ class SimpleGeometry extends Geometry { /** * @param {number} stride Stride. - * @return {GeometryLayout} layout Layout. + * @return {import("./GeometryLayout.js").default} layout Layout. */ function getLayoutForStride(stride) { let layout; @@ -311,11 +311,11 @@ function getLayoutForStride(stride) { } else if (stride == 4) { layout = GeometryLayout.XYZM; } - return /** @type {GeometryLayout} */ (layout); + return /** @type {import("./GeometryLayout.js").default} */ (layout); } /** - * @param {GeometryLayout} layout Layout. + * @param {import("./GeometryLayout.js").default} layout Layout. * @return {number} Stride. */ export function getStrideForLayout(layout) { diff --git a/src/ol/interaction/Draw.js b/src/ol/interaction/Draw.js index 97181fca9f..ab52f255a6 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -34,7 +34,7 @@ import {squaredDistance as squaredCoordinateDistance} from '../coordinate.js'; /** * @typedef {Object} Options - * @property {GeometryType} type Geometry type of + * @property {import("../geom/GeometryType.js").default} type Geometry type of * the geometries being drawn with this instance. * @property {number} [clickTolerance=6] The maximum distance in pixels between * "down" and "up" for a "up" event to be considered a "click" event and @@ -244,10 +244,10 @@ class Draw extends PointerInteraction { /** * Geometry type. - * @type {GeometryType} + * @type {import("../geom/GeometryType.js").default} * @private */ - this.type_ = /** @type {GeometryType} */ (options.type); + this.type_ = /** @type {import("../geom/GeometryType.js").default} */ (options.type); /** * Drawing mode (derived from geometry type. @@ -1166,7 +1166,7 @@ export function createBox() { /** * Get the drawing mode. The mode for mult-part geometries is the same as for * their single-part cousins. - * @param {GeometryType} type Geometry type. + * @param {import("../geom/GeometryType.js").default} type Geometry type. * @return {Mode} Drawing mode. */ function getMode(type) { diff --git a/src/ol/layer/Layer.js b/src/ol/layer/Layer.js index 88bf68b494..57fa50d4e1 100644 --- a/src/ol/layer/Layer.js +++ b/src/ol/layer/Layer.js @@ -46,7 +46,7 @@ import {listen, unlistenByKey} from '../events.js'; * @typedef {Object} State * @property {import("./Layer.js").default} layer * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point. - * @property {SourceState} sourceState + * @property {import("../source/State.js").default} sourceState * @property {boolean} visible * @property {boolean} managed * @property {import("../extent.js").Extent} [extent] diff --git a/src/ol/layer/VectorTile.js b/src/ol/layer/VectorTile.js index 8e08c09e9b..3375b2ccf3 100644 --- a/src/ol/layer/VectorTile.js +++ b/src/ol/layer/VectorTile.js @@ -104,7 +104,7 @@ class VectorTileLayer extends BaseVectorLayer { /** * @private - * @type {VectorTileRenderType} + * @type {import("./VectorTileRenderType.js").default} */ this.renderMode_ = renderMode; @@ -144,7 +144,7 @@ class VectorTileLayer extends BaseVectorLayer { } /** - * @return {VectorTileRenderType} The render mode. + * @return {import("./VectorTileRenderType.js").default} The render mode. */ getRenderMode() { return this.renderMode_; diff --git a/src/ol/proj.js b/src/ol/proj.js index 0c36186a9d..ed4e1e00b4 100644 --- a/src/ol/proj.js +++ b/src/ol/proj.js @@ -181,7 +181,7 @@ export function get(projectionLike) { * @param {ProjectionLike} projection The projection. * @param {number} resolution Nominal resolution in projection units. * @param {import("./coordinate.js").Coordinate} point Point to find adjusted resolution at. - * @param {Units=} opt_units Units to get the point resolution in. + * @param {import("./proj/Units.js").default=} opt_units Units to get the point resolution in. * Default is the projection's units. * @return {number} Point resolution. * @api diff --git a/src/ol/render/Feature.js b/src/ol/render/Feature.js index eb36c15c72..4694772b46 100644 --- a/src/ol/render/Feature.js +++ b/src/ol/render/Feature.js @@ -34,7 +34,7 @@ const tmpTransform = createTransform(); */ class RenderFeature { /** - * @param {GeometryType} type Geometry type. + * @param {import("../geom/GeometryType.js").default} type Geometry type. * @param {Array} flatCoordinates Flat coordinates. These always need * to be right-handed for polygons. * @param {Array|Array>} ends Ends or Endss. @@ -56,7 +56,7 @@ class RenderFeature { /** * @private - * @type {GeometryType} + * @type {import("../geom/GeometryType.js").default} */ this.type_ = type; @@ -267,7 +267,7 @@ class RenderFeature { /** * Get the type of this feature's geometry. - * @return {GeometryType} Geometry type. + * @return {import("../geom/GeometryType.js").default} Geometry type. * @api */ getType() { diff --git a/src/ol/render/canvas/Builder.js b/src/ol/render/canvas/Builder.js index 4f83837cca..ee7f180e02 100644 --- a/src/ol/render/canvas/Builder.js +++ b/src/ol/render/canvas/Builder.js @@ -370,7 +370,7 @@ class CanvasBuilder extends VectorContext { let begin = -1; for (i = 0; i < n; ++i) { instruction = hitDetectionInstructions[i]; - type = /** @type {CanvasInstruction} */ (instruction[0]); + type = /** @type {import("./Instruction.js").default} */ (instruction[0]); if (type == CanvasInstruction.END_GEOMETRY) { begin = i; } else if (type == CanvasInstruction.BEGIN_GEOMETRY) { diff --git a/src/ol/render/canvas/Executor.js b/src/ol/render/canvas/Executor.js index d5e01688a6..d023d1a604 100644 --- a/src/ol/render/canvas/Executor.js +++ b/src/ol/render/canvas/Executor.js @@ -669,7 +669,7 @@ class Executor { let x, y; while (i < ii) { const instruction = instructions[i]; - const type = /** @type {CanvasInstruction} */ (instruction[0]); + const type = /** @type {import("./Instruction.js").default} */ (instruction[0]); switch (type) { case CanvasInstruction.BEGIN_GEOMETRY: feature = /** @type {import("../../Feature.js").FeatureLike} */ (instruction[1]); diff --git a/src/ol/render/canvas/ExecutorGroup.js b/src/ol/render/canvas/ExecutorGroup.js index 80eda70dcb..cf7fa73242 100644 --- a/src/ol/render/canvas/ExecutorGroup.js +++ b/src/ol/render/canvas/ExecutorGroup.js @@ -16,7 +16,7 @@ import {transform2D} from '../../geom/flat/transform.js'; /** * @const - * @type {Array} + * @type {Array} */ const ORDER = [ BuilderType.POLYGON, @@ -36,7 +36,7 @@ class ExecutorGroup { * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. * @param {boolean} overlaps The executor group can have overlapping geometries. - * @param {!Object>} allInstructions + * @param {!Object>} allInstructions * The serializable instructions. * @param {number=} opt_renderBuffer Optional rendering buffer. */ @@ -80,7 +80,7 @@ class ExecutorGroup { /** * @private - * @type {!Object>} + * @type {!Object>} */ this.executorsByZIndex_ = {}; @@ -116,7 +116,7 @@ class ExecutorGroup { /** * Create executors and populate them using the provided instructions. * @private - * @param {!Object>} allInstructions The serializable instructions + * @param {!Object>} allInstructions The serializable instructions */ createExecutors_(allInstructions) { for (const zIndex in allInstructions) { @@ -139,7 +139,7 @@ class ExecutorGroup { } /** - * @param {Array} executors Executors. + * @param {Array} executors Executors. * @return {boolean} Has executors of the provided types. */ hasExecutors(executors) { @@ -313,7 +313,7 @@ class ExecutorGroup { * @param {import("../../transform.js").Transform} transform Transform. * @param {number} viewRotation View rotation. * @param {boolean} snapToPixel Snap point symbols and test to integer pixel. - * @param {Array=} opt_builderTypes Ordered replay types to replay. + * @param {Array=} opt_builderTypes Ordered replay types to replay. * Default is {@link module:ol/render/replay~ORDER} * @param {Object=} opt_declutterReplays Declutter replays. */ diff --git a/src/ol/source/IIIF.js b/src/ol/source/IIIF.js index a69d5deb55..9d55639b0b 100644 --- a/src/ol/source/IIIF.js +++ b/src/ol/source/IIIF.js @@ -41,7 +41,7 @@ import {toSize} from '../size.js'; * @property {number} [transition] * @property {string} [url] Base URL of the IIIF Image service. * This should be the same as the IIIF Image ID. - * @property {Versions} [version=Versions.VERSION2] Service's IIIF Image API version. + * @property {import("../format/IIIFInfo.js").Versions} [version=Versions.VERSION2] Service's IIIF Image API version. * @property {number} [zDirection=0] Indicate which resolution should be used * by a renderer if the view resolution does not match any resolution of the tile source. * If 0, the nearest resolution will be used. If 1, the nearest lower resolution diff --git a/src/ol/source/Source.js b/src/ol/source/Source.js index 76339aab06..f62c5c7490 100644 --- a/src/ol/source/Source.js +++ b/src/ol/source/Source.js @@ -29,7 +29,7 @@ import {get as getProjection} from '../proj.js'; * @property {AttributionLike} [attributions] * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible. * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. - * @property {SourceState} [state='ready'] + * @property {import("./State.js").default} [state='ready'] * @property {boolean} [wrapX=false] */ @@ -80,7 +80,7 @@ class Source extends BaseObject { /** * @private - * @type {SourceState} + * @type {import("./State.js").default} */ this.state_ = options.state !== undefined ? options.state : SourceState.READY; @@ -126,7 +126,7 @@ class Source extends BaseObject { /** * Get the state of the source, see {@link module:ol/source/State~State} for possible states. - * @return {SourceState} State. + * @return {import("./State.js").default} State. * @api */ getState() { @@ -162,7 +162,7 @@ class Source extends BaseObject { /** * Set the state of the source. - * @param {SourceState} state State. + * @param {import("./State.js").default} state State. * @protected */ setState(state) { diff --git a/src/ol/source/UTFGrid.js b/src/ol/source/UTFGrid.js index 80a4ce463c..272f545ae2 100644 --- a/src/ol/source/UTFGrid.js +++ b/src/ol/source/UTFGrid.js @@ -26,7 +26,7 @@ import {jsonp as requestJSONP} from '../net.js'; export class CustomTile extends Tile { /** * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate. - * @param {TileState} state State. + * @param {import("../TileState.js").default} state State. * @param {string} src Image source URI. * @param {import("../extent.js").Extent} extent Extent of the tile. * @param {boolean} preemptive Load the tile when visible (before it's needed). diff --git a/src/ol/source/Zoomify.js b/src/ol/source/Zoomify.js index c6d14fd539..f2511fe24b 100644 --- a/src/ol/source/Zoomify.js +++ b/src/ol/source/Zoomify.js @@ -25,7 +25,7 @@ export class CustomTile extends ImageTile { /** * @param {import("../size.js").Size} tileSize Full tile size. * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate. - * @param {TileState} state State. + * @param {import("../TileState.js").default} state State. * @param {string} src Image source URI. * @param {?string} crossOrigin Cross origin. * @param {import("../Tile.js").LoadFunction} tileLoadFunction Tile load function. diff --git a/src/ol/tilegrid.js b/src/ol/tilegrid.js index 467821e795..c31f58c740 100644 --- a/src/ol/tilegrid.js +++ b/src/ol/tilegrid.js @@ -57,7 +57,7 @@ export function wrapX(tileGrid, tileCoord, projection) { * DEFAULT_MAX_ZOOM). * @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses * DEFAULT_TILE_SIZE). - * @param {Corner=} opt_corner Extent corner (default is `'top-left'`). + * @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`). * @return {!TileGrid} TileGrid instance. */ export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) { @@ -153,7 +153,7 @@ function resolutionsFromExtent( * DEFAULT_MAX_ZOOM). * @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses * DEFAULT_TILE_SIZE). - * @param {Corner=} opt_corner Extent corner (default is `'top-left'`). + * @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`). * @return {!TileGrid} TileGrid instance. */ export function createForProjection(