diff --git a/externs/olx.js b/externs/olx.js index 16bddc6b9b..ee4025f22b 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2598,18 +2598,18 @@ olx.source.ZoomifyOptions.prototype.tileSize; /** - * @typedef {{fill: (ol.style.Fill|undefined), + * @typedef {{fill: (module:ol/style/Fill~Fill|undefined), * radius: number, * snapToPixel: (boolean|undefined), - * stroke: (ol.style.Stroke|undefined), - * atlasManager: (ol.style.AtlasManager|undefined)}} + * stroke: (module:ol/style/Stroke~Stroke|undefined), + * atlasManager: (module:ol/style/AtlasManager~AtlasManager|undefined)}} */ olx.style.CircleOptions; /** * Fill style. - * @type {ol.style.Fill|undefined} + * @type {module:ol/style/Fill~Fill|undefined} * @api */ olx.style.CircleOptions.prototype.fill; @@ -2639,7 +2639,7 @@ olx.style.CircleOptions.prototype.snapToPixel; /** * Stroke style. - * @type {ol.style.Stroke|undefined} + * @type {module:ol/style/Stroke~Stroke|undefined} * @api */ olx.style.CircleOptions.prototype.stroke; @@ -2650,7 +2650,7 @@ olx.style.CircleOptions.prototype.stroke; * recommended to use an atlas manager to avoid texture switching. * If an atlas manager is given, the circle is added to an atlas. * By default no atlas manager is used. - * @type {ol.style.AtlasManager|undefined} + * @type {module:ol/style/AtlasManager~AtlasManager|undefined} */ olx.style.CircleOptions.prototype.atlasManager; @@ -2673,14 +2673,14 @@ olx.style.FillOptions.prototype.color; /** * @typedef {{anchor: (Array.|undefined), - * anchorOrigin: (ol.style.IconOrigin|undefined), - * anchorXUnits: (ol.style.IconAnchorUnits|undefined), - * anchorYUnits: (ol.style.IconAnchorUnits|undefined), + * anchorOrigin: (module:ol/style/IconOrigin~IconOrigin|undefined), + * anchorXUnits: (module:ol/style/IconAnchorUnits~IconAnchorUnits|undefined), + * anchorYUnits: (module:ol/style/IconAnchorUnits~IconAnchorUnits|undefined), * color: (ol.Color|string|undefined), * crossOrigin: (null|string|undefined), * img: (Image|HTMLCanvasElement|undefined), * offset: (Array.|undefined), - * offsetOrigin: (ol.style.IconOrigin|undefined), + * offsetOrigin: (module:ol/style/IconOrigin~IconOrigin|undefined), * opacity: (number|undefined), * scale: (number|undefined), * snapToPixel: (boolean|undefined), @@ -2704,7 +2704,7 @@ olx.style.IconOptions.prototype.anchor; /** * Origin of the anchor: `bottom-left`, `bottom-right`, `top-left` or * `top-right`. Default is `top-left`. - * @type {ol.style.IconOrigin|undefined} + * @type {module:ol/style/IconOrigin~IconOrigin|undefined} * @api */ olx.style.IconOptions.prototype.anchorOrigin; @@ -2714,7 +2714,7 @@ olx.style.IconOptions.prototype.anchorOrigin; * Units in which the anchor x value is specified. A value of `'fraction'` * indicates the x value is a fraction of the icon. A value of `'pixels'` * indicates the x value in pixels. Default is `'fraction'`. - * @type {ol.style.IconAnchorUnits|undefined} + * @type {module:ol/style/IconAnchorUnits~IconAnchorUnits|undefined} * @api */ olx.style.IconOptions.prototype.anchorXUnits; @@ -2724,7 +2724,7 @@ olx.style.IconOptions.prototype.anchorXUnits; * Units in which the anchor y value is specified. A value of `'fraction'` * indicates the y value is a fraction of the icon. A value of `'pixels'` * indicates the y value in pixels. Default is `'fraction'`. - * @type {ol.style.IconAnchorUnits|undefined} + * @type {module:ol/style/IconAnchorUnits~IconAnchorUnits|undefined} * @api */ olx.style.IconOptions.prototype.anchorYUnits; @@ -2773,7 +2773,7 @@ olx.style.IconOptions.prototype.offset; /** * Origin of the offset: `bottom-left`, `bottom-right`, `top-left` or * `top-right`. Default is `top-left`. - * @type {ol.style.IconOrigin|undefined} + * @type {module:ol/style/IconOrigin~IconOrigin|undefined} * @api */ olx.style.IconOptions.prototype.offsetOrigin; @@ -2854,24 +2854,24 @@ olx.style.IconOptions.prototype.src; /** * Specify radius for regular polygons, or radius1 and radius2 for stars. - * @typedef {{fill: (ol.style.Fill|undefined), + * @typedef {{fill: (module:ol/style/Fill~Fill|undefined), * points: number, * radius: (number|undefined), * radius1: (number|undefined), * radius2: (number|undefined), * angle: (number|undefined), * snapToPixel: (boolean|undefined), - * stroke: (ol.style.Stroke|undefined), + * stroke: (module:ol/style/Stroke~Stroke|undefined), * rotation: (number|undefined), * rotateWithView: (boolean|undefined), - * atlasManager: (ol.style.AtlasManager|undefined)}} + * atlasManager: (module:ol/style/AtlasManager~AtlasManager|undefined)}} */ olx.style.RegularShapeOptions; /** * Fill style. - * @type {ol.style.Fill|undefined} + * @type {module:ol/style/Fill~Fill|undefined} * @api */ olx.style.RegularShapeOptions.prototype.fill; @@ -2936,7 +2936,7 @@ olx.style.RegularShapeOptions.prototype.snapToPixel; /** * Stroke style. - * @type {ol.style.Stroke|undefined} + * @type {module:ol/style/Stroke~Stroke|undefined} * @api */ olx.style.RegularShapeOptions.prototype.stroke; @@ -2963,7 +2963,7 @@ olx.style.RegularShapeOptions.prototype.rotateWithView; * recommended to use an atlas manager to avoid texture switching. * If an atlas manager is given, the symbol is added to an atlas. * By default no atlas manager is used. - * @type {ol.style.AtlasManager|undefined} + * @type {module:ol/style/AtlasManager~AtlasManager|undefined} */ olx.style.RegularShapeOptions.prototype.atlasManager; @@ -3050,17 +3050,17 @@ olx.style.StrokeOptions.prototype.width; * offsetX: (number|undefined), * offsetY: (number|undefined), * overflow: (boolean|undefined), - * placement: (ol.style.TextPlacement|string|undefined), + * placement: (module:ol/style/Text~TextPlacement|string|undefined), * scale: (number|undefined), * rotateWithView: (boolean|undefined), * rotation: (number|undefined), * text: (string|undefined), * textAlign: (string|undefined), * textBaseline: (string|undefined), - * fill: (ol.style.Fill|undefined), - * stroke: (ol.style.Stroke|undefined), - * backgroundFill: (ol.style.Fill|undefined), - * backgroundStroke: (ol.style.Stroke|undefined), + * fill: (module:ol/style/Fill~Fill|undefined), + * stroke: (module:ol/style/Stroke~Stroke|undefined), + * backgroundFill: (module:ol/style/Fill~Fill|undefined), + * backgroundStroke: (module:ol/style/Stroke~Stroke|undefined), * padding: (Array.|undefined)}} */ olx.style.TextOptions; @@ -3116,7 +3116,7 @@ olx.style.TextOptions.prototype.overflow; /** * Text placement. - * @type {ol.style.TextPlacement|undefined} + * @type {module:ol/style/Text~TextPlacement|undefined} * @api */ olx.style.TextOptions.prototype.placement; @@ -3176,7 +3176,7 @@ olx.style.TextOptions.prototype.textBaseline; /** * Fill style. If none is provided, we'll use a dark fill-style (#333). - * @type {ol.style.Fill|undefined} + * @type {module:ol/style/Fill~Fill|undefined} * @api */ olx.style.TextOptions.prototype.fill; @@ -3184,7 +3184,7 @@ olx.style.TextOptions.prototype.fill; /** * Stroke style. - * @type {ol.style.Stroke|undefined} + * @type {module:ol/style/Stroke~Stroke|undefined} * @api */ olx.style.TextOptions.prototype.stroke; @@ -3193,7 +3193,7 @@ olx.style.TextOptions.prototype.stroke; /** * Fill style for the text background when `placement` is `'point'`. Default is * no fill. - * @type {ol.style.Fill|undefined} + * @type {module:ol/style/Fill~Fill|undefined} * @api */ olx.style.TextOptions.prototype.backgroundFill; @@ -3202,7 +3202,7 @@ olx.style.TextOptions.prototype.backgroundFill; /** * Stroke style for the text background when `placement` is `'point'`. Default * is no stroke. - * @type {ol.style.Stroke|undefined} + * @type {module:ol/style/Stroke~Stroke|undefined} * @api */ olx.style.TextOptions.prototype.backgroundStroke; @@ -3220,11 +3220,11 @@ olx.style.TextOptions.prototype.padding; /** * @typedef {{geometry: (undefined|string|module:ol/geom/Geometry~Geometry|ol.StyleGeometryFunction), - * fill: (ol.style.Fill|undefined), - * image: (ol.style.Image|undefined), + * fill: (module:ol/style/Fill~Fill|undefined), + * image: (module:ol/style/Image~ImageStyle|undefined), * renderer: (ol.StyleRenderFunction|undefined), - * stroke: (ol.style.Stroke|undefined), - * text: (ol.style.Text|undefined), + * stroke: (module:ol/style/Stroke~Stroke|undefined), + * text: (module:ol/style/Text~Text|undefined), * zIndex: (number|undefined)}} */ olx.style.StyleOptions; @@ -3241,7 +3241,7 @@ olx.style.StyleOptions.prototype.geometry; /** * Fill style. - * @type {ol.style.Fill|undefined} + * @type {module:ol/style/Fill~Fill|undefined} * @api */ olx.style.StyleOptions.prototype.fill; @@ -3249,7 +3249,7 @@ olx.style.StyleOptions.prototype.fill; /** * Image style. - * @type {ol.style.Image|undefined} + * @type {module:ol/style/Image~ImageStyle|undefined} * @api */ olx.style.StyleOptions.prototype.image; @@ -3267,7 +3267,7 @@ olx.style.StyleOptions.prototype.renderer; /** * Stroke style. - * @type {ol.style.Stroke|undefined} + * @type {module:ol/style/Stroke~Stroke|undefined} * @api */ olx.style.StyleOptions.prototype.stroke; @@ -3275,7 +3275,7 @@ olx.style.StyleOptions.prototype.stroke; /** * Text style. - * @type {ol.style.Text|undefined} + * @type {module:ol/style/Text~Text|undefined} * @api */ olx.style.StyleOptions.prototype.text; diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 10916336b2..d874aa6e34 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -54,13 +54,13 @@ import {createElementNS, getAllTextContent, isDocument, isNode, makeArrayExtende let DEFAULT_COLOR; /** - * @type {ol.style.Fill} + * @type {module:ol/style/Fill~Fill} */ let DEFAULT_FILL_STYLE = null; /** * Get the default fill style (or null if not yet set). - * @return {ol.style.Fill} The default fill style. + * @return {module:ol/style/Fill~Fill} The default fill style. */ export function getDefaultFillStyle() { return DEFAULT_FILL_STYLE; @@ -97,13 +97,13 @@ let DEFAULT_IMAGE_STYLE_SRC; let DEFAULT_IMAGE_SCALE_MULTIPLIER; /** - * @type {ol.style.Image} + * @type {module:ol/style/Image~ImageStyle} */ let DEFAULT_IMAGE_STYLE = null; /** * Get the default image style (or null if not yet set). - * @return {ol.style.Image} The default image style. + * @return {module:ol/style/Image~ImageStyle} The default image style. */ export function getDefaultImageStyle() { return DEFAULT_IMAGE_STYLE; @@ -115,57 +115,57 @@ export function getDefaultImageStyle() { let DEFAULT_NO_IMAGE_STYLE; /** - * @type {ol.style.Stroke} + * @type {module:ol/style/Stroke~Stroke} */ let DEFAULT_STROKE_STYLE = null; /** * Get the default stroke style (or null if not yet set). - * @return {ol.style.Stroke} The default stroke style. + * @return {module:ol/style/Stroke~Stroke} The default stroke style. */ export function getDefaultStrokeStyle() { return DEFAULT_STROKE_STYLE; } /** - * @type {ol.style.Stroke} + * @type {module:ol/style/Stroke~Stroke} */ let DEFAULT_TEXT_STROKE_STYLE; /** - * @type {ol.style.Text} + * @type {module:ol/style/Text~Text} */ let DEFAULT_TEXT_STYLE = null; /** * Get the default text style (or null if not yet set). - * @return {ol.style.Text} The default text style. + * @return {module:ol/style/Text~Text} The default text style. */ export function getDefaultTextStyle() { return DEFAULT_TEXT_STYLE; } /** - * @type {ol.style.Style} + * @type {module:ol/style/Style~Style} */ let DEFAULT_STYLE = null; /** * Get the default style (or null if not yet set). - * @return {ol.style.Style} The default style. + * @return {module:ol/style/Style~Style} The default style. */ export function getDefaultStyle() { return DEFAULT_STYLE; } /** - * @type {Array.} + * @type {Array.} */ let DEFAULT_STYLE_ARRAY = null; /** * Get the default style array (or null if not yet set). - * @return {Array.} The default style. + * @return {Array.} The default style. */ export function getDefaultStyleArray() { return DEFAULT_STYLE_ARRAY; @@ -234,7 +234,7 @@ function createStyleDefaults() { /** * @const - * @type {Array.} + * @type {Array.} * @private */ DEFAULT_STYLE_ARRAY = [DEFAULT_STYLE]; @@ -246,7 +246,7 @@ function createStyleDefaults() { * @typedef {Object} Options * @property {boolean} [extractStyles=true] Extract styles from the KML. * @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points. - * @property {Array.} [defaultStyle] Default style. The + * @property {Array.} [defaultStyle] Default style. The * default default style is the same as Google Earth. * @property {boolean} [writeStyles=true] Write styles into KML. */ @@ -281,7 +281,7 @@ const KML = function(opt_options) { /** * @private - * @type {Array.} + * @type {Array.} */ this.defaultStyle_ = options.defaultStyle ? options.defaultStyle : DEFAULT_STYLE_ARRAY; @@ -302,7 +302,7 @@ const KML = function(opt_options) { /** * @private - * @type {!Object.|string)>} + * @type {!Object.|string)>} */ this.sharedStyles_ = {}; @@ -359,9 +359,9 @@ const ICON_ANCHOR_UNITS_MAP = { /** - * @param {ol.style.Style|undefined} foundStyle Style. + * @param {module:ol/style/Style~Style|undefined} foundStyle Style. * @param {string} name Name. - * @return {ol.style.Style} style Style. + * @return {module:ol/style/Style~Style} style Style. */ function createNameStyleFunction(foundStyle, name) { let textStyle = null; @@ -406,10 +406,10 @@ function createNameStyleFunction(foundStyle, name) { /** - * @param {Array.|undefined} style Style. + * @param {Array.|undefined} style Style. * @param {string} styleUrl Style URL. - * @param {Array.} defaultStyle Default style. - * @param {!Object.|string)>} sharedStyles Shared styles. + * @param {Array.} defaultStyle Default style. + * @param {!Object.|string)>} sharedStyles Shared styles. * @param {boolean|undefined} showPointNames true to show names for point placemarks. * @return {module:ol/style~StyleFunction} Feature style function. */ @@ -419,11 +419,11 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles, /** * @param {module:ol/Feature~Feature} feature feature. * @param {number} resolution Resolution. - * @return {Array.} Style. + * @return {Array.} Style. */ function(feature, resolution) { let drawName = showPointNames; - /** @type {ol.style.Style|undefined} */ + /** @type {module:ol/style/Style~Style|undefined} */ let nameStyle; let name = ''; if (drawName) { @@ -464,11 +464,11 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles, /** - * @param {Array.|string|undefined} styleValue Style value. - * @param {Array.} defaultStyle Default style. - * @param {!Object.|string)>} sharedStyles + * @param {Array.|string|undefined} styleValue Style value. + * @param {Array.} defaultStyle Default style. + * @param {!Object.|string)>} sharedStyles * Shared styles. - * @return {Array.} Style. + * @return {Array.} Style. */ function findStyle(styleValue, defaultStyle, sharedStyles) { if (Array.isArray(styleValue)) { @@ -609,7 +609,7 @@ const STYLE_MAP_PARSERS = makeStructureNS( /** * @param {Node} node Node. * @param {Array.<*>} objectStack Object stack. - * @return {Array.|string|undefined} StyleMap. + * @return {Array.|string|undefined} StyleMap. */ function readStyleMapValue(node, objectStack) { return pushParseAndPop(undefined, @@ -1214,7 +1214,7 @@ const STYLE_PARSERS = makeStructureNS( /** * @param {Node} node Node. * @param {Array.<*>} objectStack Object stack. - * @return {Array.} Style. + * @return {Array.} Style. */ function readStyle(node, objectStack) { const styleObject = pushParseAndPop( @@ -1222,23 +1222,23 @@ function readStyle(node, objectStack) { if (!styleObject) { return null; } - let fillStyle = /** @type {ol.style.Fill} */ + let fillStyle = /** @type {module:ol/style/Fill~Fill} */ ('fillStyle' in styleObject ? styleObject['fillStyle'] : DEFAULT_FILL_STYLE); const fill = /** @type {boolean|undefined} */ (styleObject['fill']); if (fill !== undefined && !fill) { fillStyle = null; } - let imageStyle = /** @type {ol.style.Image} */ + let imageStyle = /** @type {module:ol/style/Image~ImageStyle} */ ('imageStyle' in styleObject ? styleObject['imageStyle'] : DEFAULT_IMAGE_STYLE); if (imageStyle == DEFAULT_NO_IMAGE_STYLE) { imageStyle = undefined; } - const textStyle = /** @type {ol.style.Text} */ + const textStyle = /** @type {module:ol/style/Text~Text} */ ('textStyle' in styleObject ? styleObject['textStyle'] : DEFAULT_TEXT_STYLE); - let strokeStyle = /** @type {ol.style.Stroke} */ + let strokeStyle = /** @type {module:ol/style/Stroke~Stroke} */ ('strokeStyle' in styleObject ? styleObject['strokeStyle'] : DEFAULT_STROKE_STYLE); const outline = /** @type {boolean|undefined} */ @@ -1387,7 +1387,7 @@ function pairDataParser(node, objectStack) { if (styleUrl) { objectStack[objectStack.length - 1] = styleUrl; } - const Style = /** @type {ol.style.Style} */ + const Style = /** @type {module:ol/style/Style~Style} */ (pairObject['Style']); if (Style) { objectStack[objectStack.length - 1] = Style; @@ -2341,7 +2341,7 @@ const ICON_STYLE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. - * @param {ol.style.Icon} style Icon style. + * @param {module:ol/style/Icon~Icon} style Icon style. * @param {Array.<*>} objectStack Object stack. */ function writeIconStyle(node, style, objectStack) { @@ -2419,7 +2419,7 @@ const LABEL_STYLE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. - * @param {ol.style.Text} style style. + * @param {module:ol/style/Text~Text} style style. * @param {Array.<*>} objectStack Object stack. */ function writeLabelStyle(node, style, objectStack) { @@ -2465,7 +2465,7 @@ const LINE_STYLE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. - * @param {ol.style.Stroke} style style. + * @param {module:ol/style/Stroke~Stroke} style style. * @param {Array.<*>} objectStack Object stack. */ function writeLineStyle(node, style, objectStack) { @@ -2848,7 +2848,7 @@ const COLOR_NODE_FACTORY = makeSimpleNodeFactory('color'); /** * @param {Node} node Node. - * @param {ol.style.Fill} style Style. + * @param {module:ol/style/Fill~Fill} style Style. * @param {Array.<*>} objectStack Object stack. */ function writePolyStyle(node, style, objectStack) { @@ -2894,7 +2894,7 @@ const STYLE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {Array.<*>} objectStack Object stack. */ function writeStyle(node, style, objectStack) { diff --git a/src/ol/layer/Heatmap.js b/src/ol/layer/Heatmap.js index a070127247..205b5378ff 100644 --- a/src/ol/layer/Heatmap.js +++ b/src/ol/layer/Heatmap.js @@ -100,7 +100,7 @@ const Heatmap = function(opt_options) { /** * @private - * @type {Array.>} + * @type {Array.>} */ this.styleCache_ = null; diff --git a/src/ol/layer/Vector.js b/src/ol/layer/Vector.js index 655cdc816c..f19efb66c8 100644 --- a/src/ol/layer/Vector.js +++ b/src/ol/layer/Vector.js @@ -40,7 +40,7 @@ import {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style. * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all * image and text styles, and the priority is defined by the z-index of the style. Lower z-index * means higher priority. - * @property {ol.style.Style|Array.|ol.StyleFunction} [style] Layer style. See + * @property {module:ol/style/Style~Style|Array.|ol.StyleFunction} [style] Layer style. See * {@link ol.style} for default style which will be used if this is not defined. * @property {number} [maxTilesLoading=16] Maximum number tiles to load simultaneously. * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be @@ -101,7 +101,7 @@ const VectorLayer = function(opt_options) { /** * User provided style. - * @type {ol.style.Style|Array.|module:ol/style~StyleFunction} + * @type {module:ol/style/Style~Style|Array.|module:ol/style~StyleFunction} * @private */ this.style_ = null; @@ -192,7 +192,7 @@ VectorLayer.prototype.getSource; /** * Get the style for features. This returns whatever was passed to the `style` * option at construction or to the `setStyle` method. - * @return {ol.style.Style|Array.|module:ol/style~StyleFunction} + * @return {module:ol/style/Style~Style|Array.|module:ol/style~StyleFunction} * Layer style. * @api */ @@ -245,7 +245,7 @@ VectorLayer.prototype.setRenderOrder = function(renderOrder) { * it is `null` the layer has no style (a `null` style), so only features * that have their own styles will be rendered in the layer. See * {@link ol.style} for information on the default style. - * @param {ol.style.Style|Array.|module:ol/style~StyleFunction|null|undefined} + * @param {module:ol/style/Style~Style|Array.|module:ol/style~StyleFunction|null|undefined} * style Layer style. * @api */ diff --git a/src/ol/layer/VectorTile.js b/src/ol/layer/VectorTile.js index 9d638537e9..31009dce35 100644 --- a/src/ol/layer/VectorTile.js +++ b/src/ol/layer/VectorTile.js @@ -49,7 +49,7 @@ import {assign} from '../obj.js'; * image and text styles, and the priority is defined by the z-index of the style. Lower z-index * means higher priority. When set to `true`, a `renderMode` of `'image'` will be overridden with * `'hybrid'`. - * @property {ol.style.Style|Array.|ol.StyleFunction} [style] Layer style. See + * @property {module:ol/style/Style~Style|Array.|ol.StyleFunction} [style] Layer style. See * {@link ol.style} for default style which will be used if this is not defined. * @property {number} [maxTilesLoading=16] Maximum number tiles to load simultaneously. * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be @@ -62,7 +62,7 @@ import {assign} from '../obj.js'; * means no preloading. * @property {ol.RenderOrderFunction} [renderOrder] Render order. Function to be used when sorting * features before rendering. By default features are drawn in the order that they are created. - * @property {(ol.style.Style|Array.|ol.StyleFunction)} [style] Layer style. See + * @property {(module:ol/style/Style~Style|Array.|ol.StyleFunction)} [style] Layer style. See * {@link ol.style} for default style which will be used if this is not defined. * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error. */ diff --git a/src/ol/render/VectorContext.js b/src/ol/render/VectorContext.js index 3d276df26b..6db35837b0 100644 --- a/src/ol/render/VectorContext.js +++ b/src/ol/render/VectorContext.js @@ -34,7 +34,7 @@ VectorContext.prototype.drawGeometry = function(geometry) {}; /** * Set the rendering style. * - * @param {ol.style.Style} style The rendering style. + * @param {module:ol/style/Style~Style} style The rendering style. */ VectorContext.prototype.setStyle = function(style) {}; @@ -48,7 +48,7 @@ VectorContext.prototype.drawCircle = function(circleGeometry, feature) {}; /** * @param {module:ol/Feature~Feature} feature Feature. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. */ VectorContext.prototype.drawFeature = function(feature, style) {}; @@ -115,21 +115,21 @@ VectorContext.prototype.drawText = function(geometry, feature) {}; /** - * @param {ol.style.Fill} fillStyle Fill style. - * @param {ol.style.Stroke} strokeStyle Stroke style. + * @param {module:ol/style/Fill~Fill} fillStyle Fill style. + * @param {module:ol/style/Stroke~Stroke} strokeStyle Stroke style. */ VectorContext.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {}; /** - * @param {ol.style.Image} imageStyle Image style. + * @param {module:ol/style/Image~ImageStyle} imageStyle Image style. * @param {ol.DeclutterGroup=} opt_declutterGroup Declutter. */ VectorContext.prototype.setImageStyle = function(imageStyle, opt_declutterGroup) {}; /** - * @param {ol.style.Text} textStyle Text style. + * @param {module:ol/style/Text~Text} textStyle Text style. * @param {ol.DeclutterGroup=} opt_declutterGroup Declutter. */ VectorContext.prototype.setTextStyle = function(textStyle, opt_declutterGroup) {}; diff --git a/src/ol/render/canvas/Immediate.js b/src/ol/render/canvas/Immediate.js index d6fd9666f6..1f4117832d 100644 --- a/src/ol/render/canvas/Immediate.js +++ b/src/ol/render/canvas/Immediate.js @@ -435,7 +435,7 @@ CanvasImmediateRenderer.prototype.drawCircle = function(geometry) { * Set the rendering style. Note that since this is an immediate rendering API, * any `zIndex` on the provided style will be ignored. * - * @param {ol.style.Style} style The rendering style. + * @param {module:ol/style/Style~Style} style The rendering style. * @override * @api */ @@ -493,7 +493,7 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) { * {@link module:ol/layer/Vector~VectorLayer} instead. * * @param {module:ol/Feature~Feature} feature Feature. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @override * @api */ @@ -811,8 +811,8 @@ CanvasImmediateRenderer.prototype.setContextTextState_ = function(textState) { * Set the fill and stroke style for subsequent draw operations. To clear * either fill or stroke styles, pass null for the appropriate parameter. * - * @param {ol.style.Fill} fillStyle Fill style. - * @param {ol.style.Stroke} strokeStyle Stroke style. + * @param {module:ol/style/Fill~Fill} fillStyle Fill style. + * @param {module:ol/style/Stroke~Stroke} strokeStyle Stroke style. * @override */ CanvasImmediateRenderer.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) { @@ -859,7 +859,7 @@ CanvasImmediateRenderer.prototype.setFillStrokeStyle = function(fillStyle, strok * Set the image style for subsequent draw operations. Pass null to remove * the image style. * - * @param {ol.style.Image} imageStyle Image style. + * @param {module:ol/style/Image~ImageStyle} imageStyle Image style. * @override */ CanvasImmediateRenderer.prototype.setImageStyle = function(imageStyle) { @@ -891,7 +891,7 @@ CanvasImmediateRenderer.prototype.setImageStyle = function(imageStyle) { * Set the text style for subsequent draw operations. Pass null to * remove the text style. * - * @param {ol.style.Text} textStyle Text style. + * @param {module:ol/style/Text~Text} textStyle Text style. * @override */ CanvasImmediateRenderer.prototype.setTextStyle = function(textStyle) { diff --git a/src/ol/render/webgl/Immediate.js b/src/ol/render/webgl/Immediate.js index 3cec0bbc9e..cd72383feb 100644 --- a/src/ol/render/webgl/Immediate.js +++ b/src/ol/render/webgl/Immediate.js @@ -60,25 +60,25 @@ const WebGLImmediateRenderer = function(context, center, resolution, rotation, s /** * @private - * @type {ol.style.Image} + * @type {module:ol/style/Image~ImageStyle} */ this.imageStyle_ = null; /** * @private - * @type {ol.style.Fill} + * @type {module:ol/style/Fill~Fill} */ this.fillStyle_ = null; /** * @private - * @type {ol.style.Stroke} + * @type {module:ol/style/Stroke~Stroke} */ this.strokeStyle_ = null; /** * @private - * @type {ol.style.Text} + * @type {module:ol/style/Text~Text} */ this.textStyle_ = null; @@ -115,7 +115,7 @@ WebGLImmediateRenderer.prototype.drawText_ = function(replayGroup, geometry) { * Set the rendering style. Note that since this is an immediate rendering API, * any `zIndex` on the provided style will be ignored. * - * @param {ol.style.Style} style The rendering style. + * @param {module:ol/style/Style~Style} style The rendering style. * @override * @api */ diff --git a/src/ol/render/webgl/ReplayGroup.js b/src/ol/render/webgl/ReplayGroup.js index cb59c906cb..acd0f5136b 100644 --- a/src/ol/render/webgl/ReplayGroup.js +++ b/src/ol/render/webgl/ReplayGroup.js @@ -74,7 +74,7 @@ inherits(WebGLReplayGroup, ReplayGroup); /** - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {boolean} group Group with previous replay. */ WebGLReplayGroup.prototype.addDeclutter = function(style, group) {}; diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index be792ba989..256b28eaac 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -407,7 +407,7 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta * @param {module:ol/Feature~Feature} feature Feature. * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. - * @param {(ol.style.Style|Array.)} styles The style or array of + * @param {(module:ol/style/Style~Style|Array.)} styles The style or array of * styles. * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group. * @return {boolean} `true` if an image is loading. diff --git a/src/ol/renderer/canvas/VectorTileLayer.js b/src/ol/renderer/canvas/VectorTileLayer.js index 948a8ea616..4084b68448 100644 --- a/src/ol/renderer/canvas/VectorTileLayer.js +++ b/src/ol/renderer/canvas/VectorTileLayer.js @@ -448,7 +448,7 @@ CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameSta /** * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. * @param {number} squaredTolerance Squared tolerance. - * @param {(ol.style.Style|Array.)} styles The style or array of + * @param {(module:ol/style/Style~Style|Array.)} styles The style or array of * styles. * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group. * @return {boolean} `true` if an image is loading. diff --git a/src/ol/renderer/vector.js b/src/ol/renderer/vector.js index d2478848b0..3b480d52e1 100644 --- a/src/ol/renderer/vector.js +++ b/src/ol/renderer/vector.js @@ -18,7 +18,7 @@ const SIMPLIFY_TOLERANCE = 0.5; * @const * @type {Object.} + * module:ol/style/Style~Style, Object)>} */ const GEOMETRY_RENDERERS = { 'Point': renderPointGeometry, @@ -66,7 +66,7 @@ export function getTolerance(resolution, pixelRatio) { /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/geom/Circle~Circle} geometry Geometry. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {module:ol/Feature~Feature} feature Feature. */ function renderCircleGeometry(replayGroup, geometry, style, feature) { @@ -89,7 +89,7 @@ function renderCircleGeometry(replayGroup, geometry, style, feature) { /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {number} squaredTolerance Squared tolerance. * @param {function(this: T, module:ol/events/Event~Event)} listener Listener function. * @param {T} thisArg Value to use as `this` when executing `listener`. @@ -121,7 +121,7 @@ export function renderFeature(replayGroup, feature, style, squaredTolerance, lis /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {number} squaredTolerance Squared tolerance. */ function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) { @@ -143,7 +143,7 @@ function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) { /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/geom/Geometry~Geometry} geometry Geometry. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. */ function renderGeometry(replayGroup, geometry, style, feature) { @@ -162,7 +162,7 @@ function renderGeometry(replayGroup, geometry, style, feature) { /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {module:ol/Feature~Feature} feature Feature. */ function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) { @@ -179,7 +179,7 @@ function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/geom/LineString~LineString|ol.render.Feature} geometry Geometry. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. */ function renderLineStringGeometry(replayGroup, geometry, style, feature) { @@ -201,7 +201,7 @@ function renderLineStringGeometry(replayGroup, geometry, style, feature) { /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} geometry Geometry. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. */ function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) { @@ -223,7 +223,7 @@ function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) { /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {module:ol/Feature~Feature} feature Feature. */ function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) { @@ -246,7 +246,7 @@ function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) { /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/geom/Point~Point|ol.render.Feature} geometry Geometry. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. */ function renderPointGeometry(replayGroup, geometry, style, feature) { @@ -271,7 +271,7 @@ function renderPointGeometry(replayGroup, geometry, style, feature) { /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} geometry Geometry. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. */ function renderMultiPointGeometry(replayGroup, geometry, style, feature) { @@ -296,7 +296,7 @@ function renderMultiPointGeometry(replayGroup, geometry, style, feature) { /** * @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} geometry Geometry. - * @param {ol.style.Style} style Style. + * @param {module:ol/style/Style~Style} style Style. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. */ function renderPolygonGeometry(replayGroup, geometry, style, feature) { diff --git a/src/ol/renderer/webgl/VectorLayer.js b/src/ol/renderer/webgl/VectorLayer.js index 026c8accf0..6b8a79fd05 100644 --- a/src/ol/renderer/webgl/VectorLayer.js +++ b/src/ol/renderer/webgl/VectorLayer.js @@ -307,7 +307,7 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat * @param {module:ol/Feature~Feature} feature Feature. * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. - * @param {(ol.style.Style|Array.)} styles The style or array of + * @param {(module:ol/style/Style~Style|Array.)} styles The style or array of * styles. * @param {ol.render.webgl.ReplayGroup} replayGroup Replay group. * @return {boolean} `true` if an image is loading. diff --git a/src/ol/style/AtlasManager.js b/src/ol/style/AtlasManager.js index 32e21cb751..e61f2b1da4 100644 --- a/src/ol/style/AtlasManager.js +++ b/src/ol/style/AtlasManager.js @@ -80,7 +80,7 @@ const AtlasManager = function(opt_options) { /** * @private - * @type {Array.} + * @type {Array.} */ this.atlases_ = [new Atlas(this.currentSize_, this.space_)]; @@ -93,7 +93,7 @@ const AtlasManager = function(opt_options) { /** * @private - * @type {Array.} + * @type {Array.} */ this.hitAtlases_ = [new Atlas(this.currentHitSize_, this.space_)]; }; @@ -119,7 +119,7 @@ AtlasManager.prototype.getInfo = function(id) { /** * @private - * @param {Array.} atlases The atlases to search. + * @param {Array.} atlases The atlases to search. * @param {string} id The identifier of the entry to check. * @return {?module:ol/style/Atlas~AtlasInfo} The position and atlas image for the entry, * or `null` if the entry is not part of the atlases. diff --git a/src/ol/style/Circle.js b/src/ol/style/Circle.js index 0149a92b7f..165d2dabd2 100644 --- a/src/ol/style/Circle.js +++ b/src/ol/style/Circle.js @@ -10,7 +10,7 @@ import RegularShape from '../style/RegularShape.js'; * * @constructor * @param {olx.style.CircleOptions=} opt_options Options. - * @extends {ol.style.RegularShape} + * @extends {module:ol/style/RegularShape~RegularShape} * @api */ const CircleStyle = function(opt_options) { @@ -33,7 +33,7 @@ inherits(CircleStyle, RegularShape); /** * Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too. - * @return {ol.style.Circle} The cloned style. + * @return {module:ol/style/Circle~CircleStyle} The cloned style. * @override * @api */ diff --git a/src/ol/style/Fill.js b/src/ol/style/Fill.js index 75575468ca..7ee84718e3 100644 --- a/src/ol/style/Fill.js +++ b/src/ol/style/Fill.js @@ -32,7 +32,7 @@ const Fill = function(opt_options) { /** * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}. - * @return {ol.style.Fill} The cloned style. + * @return {module:ol/style/Fill~Fill} The cloned style. * @api */ Fill.prototype.clone = function() { diff --git a/src/ol/style/Icon.js b/src/ol/style/Icon.js index cc6cfb3204..f9dc715a71 100644 --- a/src/ol/style/Icon.js +++ b/src/ol/style/Icon.js @@ -18,7 +18,7 @@ import ImageStyle from '../style/Image.js'; * * @constructor * @param {olx.style.IconOptions=} opt_options Options. - * @extends {ol.style.Image} + * @extends {module:ol/style/Image~ImageStyle} * @api */ const Icon = function(opt_options) { @@ -39,21 +39,21 @@ const Icon = function(opt_options) { /** * @private - * @type {ol.style.IconOrigin} + * @type {module:ol/style/IconOrigin~IconOrigin} */ this.anchorOrigin_ = options.anchorOrigin !== undefined ? options.anchorOrigin : IconOrigin.TOP_LEFT; /** * @private - * @type {ol.style.IconAnchorUnits} + * @type {module:ol/style/IconAnchorUnits~IconAnchorUnits} */ this.anchorXUnits_ = options.anchorXUnits !== undefined ? options.anchorXUnits : IconAnchorUnits.FRACTION; /** * @private - * @type {ol.style.IconAnchorUnits} + * @type {module:ol/style/IconAnchorUnits~IconAnchorUnits} */ this.anchorYUnits_ = options.anchorYUnits !== undefined ? options.anchorYUnits : IconAnchorUnits.FRACTION; @@ -105,7 +105,7 @@ const Icon = function(opt_options) { /** * @private - * @type {ol.style.IconImage} + * @type {module:ol/style/IconImage~IconImage} */ this.iconImage_ = getIconImage( image, /** @type {string} */ (src), imgSize, this.crossOrigin_, imageState, this.color_); @@ -118,7 +118,7 @@ const Icon = function(opt_options) { /** * @private - * @type {ol.style.IconOrigin} + * @type {module:ol/style/IconOrigin~IconOrigin} */ this.offsetOrigin_ = options.offsetOrigin !== undefined ? options.offsetOrigin : IconOrigin.TOP_LEFT; @@ -177,7 +177,7 @@ inherits(Icon, ImageStyle); /** * Clones the style. The underlying Image/HTMLCanvasElement is not cloned. - * @return {ol.style.Icon} The cloned style. + * @return {module:ol/style/Icon~Icon} The cloned style. * @api */ Icon.prototype.clone = function() { diff --git a/src/ol/style/IconImage.js b/src/ol/style/IconImage.js index 556eeadc5e..48c7ffba4f 100644 --- a/src/ol/style/IconImage.js +++ b/src/ol/style/IconImage.js @@ -98,7 +98,7 @@ inherits(IconImage, EventTarget); * @param {?string} crossOrigin Cross origin. * @param {module:ol/ImageState~ImageState} imageState Image state. * @param {module:ol/color~Color} color Color. - * @return {ol.style.IconImage} Icon image. + * @return {module:ol/style/IconImage~IconImage} Icon image. */ export function get(image, src, size, crossOrigin, imageState, color) { let iconImage = iconImageCache.get(src, crossOrigin, color); diff --git a/src/ol/style/IconImageCache.js b/src/ol/style/IconImageCache.js index 6b124739f1..6f81a1f7b3 100644 --- a/src/ol/style/IconImageCache.js +++ b/src/ol/style/IconImageCache.js @@ -10,7 +10,7 @@ import {asString} from '../color.js'; const IconImageCache = function() { /** - * @type {!Object.} + * @type {!Object.} * @private */ this.cache_ = {}; @@ -71,7 +71,7 @@ IconImageCache.prototype.expire = function() { * @param {string} src Src. * @param {?string} crossOrigin Cross origin. * @param {module:ol/color~Color} color Color. - * @return {ol.style.IconImage} Icon image. + * @return {module:ol/style/IconImage~IconImage} Icon image. */ IconImageCache.prototype.get = function(src, crossOrigin, color) { const key = getKey(src, crossOrigin, color); @@ -83,7 +83,7 @@ IconImageCache.prototype.get = function(src, crossOrigin, color) { * @param {string} src Src. * @param {?string} crossOrigin Cross origin. * @param {module:ol/color~Color} color Color. - * @param {ol.style.IconImage} iconImage Icon image. + * @param {module:ol/style/IconImage~IconImage} iconImage Icon image. */ IconImageCache.prototype.set = function(src, crossOrigin, color, iconImage) { const key = getKey(src, crossOrigin, color); diff --git a/src/ol/style/Image.js b/src/ol/style/Image.js index b235926f86..ec837daa87 100644 --- a/src/ol/style/Image.js +++ b/src/ol/style/Image.js @@ -4,8 +4,8 @@ /** * @classdesc * A base class used for creating subclasses and not instantiated in - * apps. Base class for {@link ol.style.Icon}, {@link ol.style.Circle} and - * {@link ol.style.RegularShape}. + * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and + * {@link module:ol/style/RegularShape~RegularShape}. * * @constructor * @abstract diff --git a/src/ol/style/RegularShape.js b/src/ol/style/RegularShape.js index 13400b0b4e..33e9626597 100644 --- a/src/ol/style/RegularShape.js +++ b/src/ol/style/RegularShape.js @@ -17,7 +17,7 @@ import ImageStyle from '../style/Image.js'; * * @constructor * @param {olx.style.RegularShapeOptions} options Options. - * @extends {ol.style.Image} + * @extends {module:ol/style/Image~ImageStyle} * @api */ const RegularShape = function(options) { @@ -41,7 +41,7 @@ const RegularShape = function(options) { /** * @private - * @type {ol.style.Fill} + * @type {module:ol/style/Fill~Fill} */ this.fill_ = options.fill !== undefined ? options.fill : null; @@ -78,7 +78,7 @@ const RegularShape = function(options) { /** * @private - * @type {ol.style.Stroke} + * @type {module:ol/style/Stroke~Stroke} */ this.stroke_ = options.stroke !== undefined ? options.stroke : null; @@ -108,7 +108,7 @@ const RegularShape = function(options) { /** * @protected - * @type {ol.style.AtlasManager|undefined} + * @type {module:ol/style/AtlasManager~AtlasManager|undefined} */ this.atlasManager_ = options.atlasManager; @@ -140,7 +140,7 @@ inherits(RegularShape, ImageStyle); /** * Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too. - * @return {ol.style.RegularShape} The cloned style. + * @return {module:ol/style/RegularShape~RegularShape} The cloned style. * @api */ RegularShape.prototype.clone = function() { @@ -183,7 +183,7 @@ RegularShape.prototype.getAngle = function() { /** * Get the fill style for the shape. - * @return {ol.style.Fill} Fill style. + * @return {module:ol/style/Fill~Fill} Fill style. * @api */ RegularShape.prototype.getFill = function() { @@ -282,7 +282,7 @@ RegularShape.prototype.getSize = function() { /** * Get the stroke style for the shape. - * @return {ol.style.Stroke} Stroke style. + * @return {module:ol/style/Stroke~Stroke} Stroke style. * @api */ RegularShape.prototype.getStroke = function() { @@ -310,7 +310,7 @@ RegularShape.prototype.unlistenImageChange = function(listener, thisArg) {}; /** * @protected - * @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager. + * @param {module:ol/style/AtlasManager~AtlasManager|undefined} atlasManager An atlas manager. */ RegularShape.prototype.render_ = function(atlasManager) { let imageSize; diff --git a/src/ol/style/Stroke.js b/src/ol/style/Stroke.js index cdfd960d8f..78b9818890 100644 --- a/src/ol/style/Stroke.js +++ b/src/ol/style/Stroke.js @@ -70,7 +70,7 @@ const Stroke = function(opt_options) { /** * Clones the style. - * @return {ol.style.Stroke} The cloned style. + * @return {module:ol/style/Stroke~Stroke} The cloned style. * @api */ Stroke.prototype.clone = function() { diff --git a/src/ol/style/Style.js b/src/ol/style/Style.js index 4990ebb76b..e5753eac70 100644 --- a/src/ol/style/Style.js +++ b/src/ol/style/Style.js @@ -40,13 +40,13 @@ const Style = function(opt_options) { /** * @private - * @type {ol.style.Fill} + * @type {module:ol/style/Fill~Fill} */ this.fill_ = options.fill !== undefined ? options.fill : null; /** * @private - * @type {ol.style.Image} + * @type {module:ol/style/Image~ImageStyle} */ this.image_ = options.image !== undefined ? options.image : null; @@ -58,13 +58,13 @@ const Style = function(opt_options) { /** * @private - * @type {ol.style.Stroke} + * @type {module:ol/style/Stroke~Stroke} */ this.stroke_ = options.stroke !== undefined ? options.stroke : null; /** * @private - * @type {ol.style.Text} + * @type {module:ol/style/Text~Text} */ this.text_ = options.text !== undefined ? options.text : null; @@ -79,7 +79,7 @@ const Style = function(opt_options) { /** * Clones the style. - * @return {ol.style.Style} The cloned style. + * @return {module:ol/style/Style~Style} The cloned style. * @api */ Style.prototype.clone = function() { @@ -145,7 +145,7 @@ Style.prototype.getGeometryFunction = function() { /** * Get the fill style. - * @return {ol.style.Fill} Fill style. + * @return {module:ol/style/Fill~Fill} Fill style. * @api */ Style.prototype.getFill = function() { @@ -155,7 +155,7 @@ Style.prototype.getFill = function() { /** * Set the fill style. - * @param {ol.style.Fill} fill Fill style. + * @param {module:ol/style/Fill~Fill} fill Fill style. * @api */ Style.prototype.setFill = function(fill) { @@ -165,7 +165,7 @@ Style.prototype.setFill = function(fill) { /** * Get the image style. - * @return {ol.style.Image} Image style. + * @return {module:ol/style/Image~ImageStyle} Image style. * @api */ Style.prototype.getImage = function() { @@ -175,7 +175,7 @@ Style.prototype.getImage = function() { /** * Set the image style. - * @param {ol.style.Image} image Image style. + * @param {module:ol/style/Image~ImageStyle} image Image style. * @api */ Style.prototype.setImage = function(image) { @@ -185,7 +185,7 @@ Style.prototype.setImage = function(image) { /** * Get the stroke style. - * @return {ol.style.Stroke} Stroke style. + * @return {module:ol/style/Stroke~Stroke} Stroke style. * @api */ Style.prototype.getStroke = function() { @@ -195,7 +195,7 @@ Style.prototype.getStroke = function() { /** * Set the stroke style. - * @param {ol.style.Stroke} stroke Stroke style. + * @param {module:ol/style/Stroke~Stroke} stroke Stroke style. * @api */ Style.prototype.setStroke = function(stroke) { @@ -205,7 +205,7 @@ Style.prototype.setStroke = function(stroke) { /** * Get the text style. - * @return {ol.style.Text} Text style. + * @return {module:ol/style/Text~Text} Text style. * @api */ Style.prototype.getText = function() { @@ -215,7 +215,7 @@ Style.prototype.getText = function() { /** * Set the text style. - * @param {ol.style.Text} text Text style. + * @param {module:ol/style/Text~Text} text Text style. * @api */ Style.prototype.setText = function(text) { @@ -272,9 +272,9 @@ Style.prototype.setZIndex = function(zIndex) { /** * Convert the provided object into a style function. Functions passed through - * unchanged. Arrays of ol.style.Style or single style objects wrapped in a + * unchanged. Arrays of module:ol/style/Style~Style or single style objects wrapped in a * new style function. - * @param {module:ol/style~StyleFunction|Array.|ol.style.Style} obj + * @param {module:ol/style~StyleFunction|Array.|module:ol/style/Style~Style} obj * A style function, a single style, or an array of styles. * @return {module:ol/style~StyleFunction} A style function. */ @@ -285,14 +285,14 @@ export function toFunction(obj) { styleFunction = obj; } else { /** - * @type {Array.} + * @type {Array.} */ let styles; if (Array.isArray(obj)) { styles = obj; } else { assert(obj instanceof Style, - 41); // Expected an `ol.style.Style` or an array of `ol.style.Style` + 41); // Expected an `module:ol/style/Style~Style` or an array of `module:ol/style/Style~Style` styles = [obj]; } styleFunction = function() { @@ -304,7 +304,7 @@ export function toFunction(obj) { /** - * @type {Array.} + * @type {Array.} */ let defaultStyles = null; @@ -312,12 +312,12 @@ let defaultStyles = null; /** * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. * @param {number} resolution Resolution. - * @return {Array.} Style. + * @return {Array.} Style. */ export function createDefaultStyle(feature, resolution) { // We don't use an immediately-invoked function // and a closure so we don't get an error at script evaluation time in - // browsers that do not support Canvas. (ol.style.Circle does + // browsers that do not support Canvas. (module:ol/style/Circle~CircleStyle does // canvas.getContext('2d') at construction time, which will cause an.error // in such browsers.) if (!defaultStyles) { @@ -346,10 +346,10 @@ export function createDefaultStyle(feature, resolution) { /** * Default styles for editing features. - * @return {Object.>} Styles + * @return {Object.>} Styles */ export function createEditingStyle() { - /** @type {Object.>} */ + /** @type {Object.>} */ const styles = {}; const white = [255, 255, 255, 1]; const blue = [0, 153, 255, 1]; diff --git a/src/ol/style/Text.js b/src/ol/style/Text.js index 7c4b3a4776..06ab455e09 100644 --- a/src/ol/style/Text.js +++ b/src/ol/style/Text.js @@ -70,7 +70,7 @@ const Text = function(opt_options) { /** * @private - * @type {ol.style.Fill} + * @type {module:ol/style/Fill~Fill} */ this.fill_ = options.fill !== undefined ? options.fill : new Fill({color: DEFAULT_FILL_COLOR}); @@ -83,7 +83,7 @@ const Text = function(opt_options) { /** * @private - * @type {ol.style.TextPlacement|string} + * @type {module:ol/style/Text~TextPlacement|string} */ this.placement_ = options.placement !== undefined ? options.placement : TextPlacement.POINT; @@ -95,7 +95,7 @@ const Text = function(opt_options) { /** * @private - * @type {ol.style.Stroke} + * @type {module:ol/style/Stroke~Stroke} */ this.stroke_ = options.stroke !== undefined ? options.stroke : null; @@ -113,13 +113,13 @@ const Text = function(opt_options) { /** * @private - * @type {ol.style.Fill} + * @type {module:ol/style/Fill~Fill} */ this.backgroundFill_ = options.backgroundFill ? options.backgroundFill : null; /** * @private - * @type {ol.style.Stroke} + * @type {module:ol/style/Stroke~Stroke} */ this.backgroundStroke_ = options.backgroundStroke ? options.backgroundStroke : null; @@ -133,7 +133,7 @@ const Text = function(opt_options) { /** * Clones the style. - * @return {ol.style.Text} The cloned style. + * @return {module:ol/style/Text~Text} The cloned style. * @api */ Text.prototype.clone = function() { @@ -190,7 +190,7 @@ Text.prototype.getMaxAngle = function() { /** * Get the label placement. - * @return {ol.style.TextPlacement|string} Text placement. + * @return {module:ol/style/Text~TextPlacement|string} Text placement. * @api */ Text.prototype.getPlacement = function() { @@ -220,7 +220,7 @@ Text.prototype.getOffsetY = function() { /** * Get the fill style for the text. - * @return {ol.style.Fill} Fill style. + * @return {module:ol/style/Fill~Fill} Fill style. * @api */ Text.prototype.getFill = function() { @@ -260,7 +260,7 @@ Text.prototype.getScale = function() { /** * Get the stroke style for the text. - * @return {ol.style.Stroke} Stroke style. + * @return {module:ol/style/Stroke~Stroke} Stroke style. * @api */ Text.prototype.getStroke = function() { @@ -300,7 +300,7 @@ Text.prototype.getTextBaseline = function() { /** * Get the background fill style for the text. - * @return {ol.style.Fill} Fill style. + * @return {module:ol/style/Fill~Fill} Fill style. * @api */ Text.prototype.getBackgroundFill = function() { @@ -310,7 +310,7 @@ Text.prototype.getBackgroundFill = function() { /** * Get the background stroke style for the text. - * @return {ol.style.Stroke} Stroke style. + * @return {module:ol/style/Stroke~Stroke} Stroke style. * @api */ Text.prototype.getBackgroundStroke = function() { @@ -386,7 +386,7 @@ Text.prototype.setOffsetY = function(offsetY) { /** * Set the text placement. * - * @param {ol.style.TextPlacement|string} placement Placement. + * @param {module:ol/style/Text~TextPlacement|string} placement Placement. * @api */ Text.prototype.setPlacement = function(placement) { @@ -397,7 +397,7 @@ Text.prototype.setPlacement = function(placement) { /** * Set the fill. * - * @param {ol.style.Fill} fill Fill style. + * @param {module:ol/style/Fill~Fill} fill Fill style. * @api */ Text.prototype.setFill = function(fill) { @@ -430,7 +430,7 @@ Text.prototype.setScale = function(scale) { /** * Set the stroke. * - * @param {ol.style.Stroke} stroke Stroke style. + * @param {module:ol/style/Stroke~Stroke} stroke Stroke style. * @api */ Text.prototype.setStroke = function(stroke) { @@ -474,7 +474,7 @@ Text.prototype.setTextBaseline = function(textBaseline) { /** * Set the background fill. * - * @param {ol.style.Fill} fill Fill style. + * @param {module:ol/style/Fill~Fill} fill Fill style. * @api */ Text.prototype.setBackgroundFill = function(fill) { @@ -485,7 +485,7 @@ Text.prototype.setBackgroundFill = function(fill) { /** * Set the background stroke. * - * @param {ol.style.Stroke} stroke Stroke style. + * @param {module:ol/style/Stroke~Stroke} stroke Stroke style. * @api */ Text.prototype.setBackgroundStroke = function(stroke) {