Module type for ol.style.*

This commit is contained in:
Frederic Junod
2018-03-27 15:04:07 +02:00
parent 2de83adb8e
commit 7cbc22fece
24 changed files with 184 additions and 184 deletions

View File

@@ -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, * radius: number,
* snapToPixel: (boolean|undefined), * snapToPixel: (boolean|undefined),
* stroke: (ol.style.Stroke|undefined), * stroke: (module:ol/style/Stroke~Stroke|undefined),
* atlasManager: (ol.style.AtlasManager|undefined)}} * atlasManager: (module:ol/style/AtlasManager~AtlasManager|undefined)}}
*/ */
olx.style.CircleOptions; olx.style.CircleOptions;
/** /**
* Fill style. * Fill style.
* @type {ol.style.Fill|undefined} * @type {module:ol/style/Fill~Fill|undefined}
* @api * @api
*/ */
olx.style.CircleOptions.prototype.fill; olx.style.CircleOptions.prototype.fill;
@@ -2639,7 +2639,7 @@ olx.style.CircleOptions.prototype.snapToPixel;
/** /**
* Stroke style. * Stroke style.
* @type {ol.style.Stroke|undefined} * @type {module:ol/style/Stroke~Stroke|undefined}
* @api * @api
*/ */
olx.style.CircleOptions.prototype.stroke; olx.style.CircleOptions.prototype.stroke;
@@ -2650,7 +2650,7 @@ olx.style.CircleOptions.prototype.stroke;
* recommended to use an atlas manager to avoid texture switching. * recommended to use an atlas manager to avoid texture switching.
* If an atlas manager is given, the circle is added to an atlas. * If an atlas manager is given, the circle is added to an atlas.
* By default no atlas manager is used. * By default no atlas manager is used.
* @type {ol.style.AtlasManager|undefined} * @type {module:ol/style/AtlasManager~AtlasManager|undefined}
*/ */
olx.style.CircleOptions.prototype.atlasManager; olx.style.CircleOptions.prototype.atlasManager;
@@ -2673,14 +2673,14 @@ olx.style.FillOptions.prototype.color;
/** /**
* @typedef {{anchor: (Array.<number>|undefined), * @typedef {{anchor: (Array.<number>|undefined),
* anchorOrigin: (ol.style.IconOrigin|undefined), * anchorOrigin: (module:ol/style/IconOrigin~IconOrigin|undefined),
* anchorXUnits: (ol.style.IconAnchorUnits|undefined), * anchorXUnits: (module:ol/style/IconAnchorUnits~IconAnchorUnits|undefined),
* anchorYUnits: (ol.style.IconAnchorUnits|undefined), * anchorYUnits: (module:ol/style/IconAnchorUnits~IconAnchorUnits|undefined),
* color: (ol.Color|string|undefined), * color: (ol.Color|string|undefined),
* crossOrigin: (null|string|undefined), * crossOrigin: (null|string|undefined),
* img: (Image|HTMLCanvasElement|undefined), * img: (Image|HTMLCanvasElement|undefined),
* offset: (Array.<number>|undefined), * offset: (Array.<number>|undefined),
* offsetOrigin: (ol.style.IconOrigin|undefined), * offsetOrigin: (module:ol/style/IconOrigin~IconOrigin|undefined),
* opacity: (number|undefined), * opacity: (number|undefined),
* scale: (number|undefined), * scale: (number|undefined),
* snapToPixel: (boolean|undefined), * snapToPixel: (boolean|undefined),
@@ -2704,7 +2704,7 @@ olx.style.IconOptions.prototype.anchor;
/** /**
* Origin of the anchor: `bottom-left`, `bottom-right`, `top-left` or * Origin of the anchor: `bottom-left`, `bottom-right`, `top-left` or
* `top-right`. Default is `top-left`. * `top-right`. Default is `top-left`.
* @type {ol.style.IconOrigin|undefined} * @type {module:ol/style/IconOrigin~IconOrigin|undefined}
* @api * @api
*/ */
olx.style.IconOptions.prototype.anchorOrigin; 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'` * 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 is a fraction of the icon. A value of `'pixels'`
* indicates the x value in pixels. Default is `'fraction'`. * indicates the x value in pixels. Default is `'fraction'`.
* @type {ol.style.IconAnchorUnits|undefined} * @type {module:ol/style/IconAnchorUnits~IconAnchorUnits|undefined}
* @api * @api
*/ */
olx.style.IconOptions.prototype.anchorXUnits; 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'` * 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 is a fraction of the icon. A value of `'pixels'`
* indicates the y value in pixels. Default is `'fraction'`. * indicates the y value in pixels. Default is `'fraction'`.
* @type {ol.style.IconAnchorUnits|undefined} * @type {module:ol/style/IconAnchorUnits~IconAnchorUnits|undefined}
* @api * @api
*/ */
olx.style.IconOptions.prototype.anchorYUnits; 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 * Origin of the offset: `bottom-left`, `bottom-right`, `top-left` or
* `top-right`. Default is `top-left`. * `top-right`. Default is `top-left`.
* @type {ol.style.IconOrigin|undefined} * @type {module:ol/style/IconOrigin~IconOrigin|undefined}
* @api * @api
*/ */
olx.style.IconOptions.prototype.offsetOrigin; 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. * 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, * points: number,
* radius: (number|undefined), * radius: (number|undefined),
* radius1: (number|undefined), * radius1: (number|undefined),
* radius2: (number|undefined), * radius2: (number|undefined),
* angle: (number|undefined), * angle: (number|undefined),
* snapToPixel: (boolean|undefined), * snapToPixel: (boolean|undefined),
* stroke: (ol.style.Stroke|undefined), * stroke: (module:ol/style/Stroke~Stroke|undefined),
* rotation: (number|undefined), * rotation: (number|undefined),
* rotateWithView: (boolean|undefined), * rotateWithView: (boolean|undefined),
* atlasManager: (ol.style.AtlasManager|undefined)}} * atlasManager: (module:ol/style/AtlasManager~AtlasManager|undefined)}}
*/ */
olx.style.RegularShapeOptions; olx.style.RegularShapeOptions;
/** /**
* Fill style. * Fill style.
* @type {ol.style.Fill|undefined} * @type {module:ol/style/Fill~Fill|undefined}
* @api * @api
*/ */
olx.style.RegularShapeOptions.prototype.fill; olx.style.RegularShapeOptions.prototype.fill;
@@ -2936,7 +2936,7 @@ olx.style.RegularShapeOptions.prototype.snapToPixel;
/** /**
* Stroke style. * Stroke style.
* @type {ol.style.Stroke|undefined} * @type {module:ol/style/Stroke~Stroke|undefined}
* @api * @api
*/ */
olx.style.RegularShapeOptions.prototype.stroke; olx.style.RegularShapeOptions.prototype.stroke;
@@ -2963,7 +2963,7 @@ olx.style.RegularShapeOptions.prototype.rotateWithView;
* recommended to use an atlas manager to avoid texture switching. * recommended to use an atlas manager to avoid texture switching.
* If an atlas manager is given, the symbol is added to an atlas. * If an atlas manager is given, the symbol is added to an atlas.
* By default no atlas manager is used. * By default no atlas manager is used.
* @type {ol.style.AtlasManager|undefined} * @type {module:ol/style/AtlasManager~AtlasManager|undefined}
*/ */
olx.style.RegularShapeOptions.prototype.atlasManager; olx.style.RegularShapeOptions.prototype.atlasManager;
@@ -3050,17 +3050,17 @@ olx.style.StrokeOptions.prototype.width;
* offsetX: (number|undefined), * offsetX: (number|undefined),
* offsetY: (number|undefined), * offsetY: (number|undefined),
* overflow: (boolean|undefined), * overflow: (boolean|undefined),
* placement: (ol.style.TextPlacement|string|undefined), * placement: (module:ol/style/Text~TextPlacement|string|undefined),
* scale: (number|undefined), * scale: (number|undefined),
* rotateWithView: (boolean|undefined), * rotateWithView: (boolean|undefined),
* rotation: (number|undefined), * rotation: (number|undefined),
* text: (string|undefined), * text: (string|undefined),
* textAlign: (string|undefined), * textAlign: (string|undefined),
* textBaseline: (string|undefined), * textBaseline: (string|undefined),
* fill: (ol.style.Fill|undefined), * fill: (module:ol/style/Fill~Fill|undefined),
* stroke: (ol.style.Stroke|undefined), * stroke: (module:ol/style/Stroke~Stroke|undefined),
* backgroundFill: (ol.style.Fill|undefined), * backgroundFill: (module:ol/style/Fill~Fill|undefined),
* backgroundStroke: (ol.style.Stroke|undefined), * backgroundStroke: (module:ol/style/Stroke~Stroke|undefined),
* padding: (Array.<number>|undefined)}} * padding: (Array.<number>|undefined)}}
*/ */
olx.style.TextOptions; olx.style.TextOptions;
@@ -3116,7 +3116,7 @@ olx.style.TextOptions.prototype.overflow;
/** /**
* Text placement. * Text placement.
* @type {ol.style.TextPlacement|undefined} * @type {module:ol/style/Text~TextPlacement|undefined}
* @api * @api
*/ */
olx.style.TextOptions.prototype.placement; 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). * 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 * @api
*/ */
olx.style.TextOptions.prototype.fill; olx.style.TextOptions.prototype.fill;
@@ -3184,7 +3184,7 @@ olx.style.TextOptions.prototype.fill;
/** /**
* Stroke style. * Stroke style.
* @type {ol.style.Stroke|undefined} * @type {module:ol/style/Stroke~Stroke|undefined}
* @api * @api
*/ */
olx.style.TextOptions.prototype.stroke; 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 * Fill style for the text background when `placement` is `'point'`. Default is
* no fill. * no fill.
* @type {ol.style.Fill|undefined} * @type {module:ol/style/Fill~Fill|undefined}
* @api * @api
*/ */
olx.style.TextOptions.prototype.backgroundFill; 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 * Stroke style for the text background when `placement` is `'point'`. Default
* is no stroke. * is no stroke.
* @type {ol.style.Stroke|undefined} * @type {module:ol/style/Stroke~Stroke|undefined}
* @api * @api
*/ */
olx.style.TextOptions.prototype.backgroundStroke; 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), * @typedef {{geometry: (undefined|string|module:ol/geom/Geometry~Geometry|ol.StyleGeometryFunction),
* fill: (ol.style.Fill|undefined), * fill: (module:ol/style/Fill~Fill|undefined),
* image: (ol.style.Image|undefined), * image: (module:ol/style/Image~ImageStyle|undefined),
* renderer: (ol.StyleRenderFunction|undefined), * renderer: (ol.StyleRenderFunction|undefined),
* stroke: (ol.style.Stroke|undefined), * stroke: (module:ol/style/Stroke~Stroke|undefined),
* text: (ol.style.Text|undefined), * text: (module:ol/style/Text~Text|undefined),
* zIndex: (number|undefined)}} * zIndex: (number|undefined)}}
*/ */
olx.style.StyleOptions; olx.style.StyleOptions;
@@ -3241,7 +3241,7 @@ olx.style.StyleOptions.prototype.geometry;
/** /**
* Fill style. * Fill style.
* @type {ol.style.Fill|undefined} * @type {module:ol/style/Fill~Fill|undefined}
* @api * @api
*/ */
olx.style.StyleOptions.prototype.fill; olx.style.StyleOptions.prototype.fill;
@@ -3249,7 +3249,7 @@ olx.style.StyleOptions.prototype.fill;
/** /**
* Image style. * Image style.
* @type {ol.style.Image|undefined} * @type {module:ol/style/Image~ImageStyle|undefined}
* @api * @api
*/ */
olx.style.StyleOptions.prototype.image; olx.style.StyleOptions.prototype.image;
@@ -3267,7 +3267,7 @@ olx.style.StyleOptions.prototype.renderer;
/** /**
* Stroke style. * Stroke style.
* @type {ol.style.Stroke|undefined} * @type {module:ol/style/Stroke~Stroke|undefined}
* @api * @api
*/ */
olx.style.StyleOptions.prototype.stroke; olx.style.StyleOptions.prototype.stroke;
@@ -3275,7 +3275,7 @@ olx.style.StyleOptions.prototype.stroke;
/** /**
* Text style. * Text style.
* @type {ol.style.Text|undefined} * @type {module:ol/style/Text~Text|undefined}
* @api * @api
*/ */
olx.style.StyleOptions.prototype.text; olx.style.StyleOptions.prototype.text;

View File

@@ -54,13 +54,13 @@ import {createElementNS, getAllTextContent, isDocument, isNode, makeArrayExtende
let DEFAULT_COLOR; let DEFAULT_COLOR;
/** /**
* @type {ol.style.Fill} * @type {module:ol/style/Fill~Fill}
*/ */
let DEFAULT_FILL_STYLE = null; let DEFAULT_FILL_STYLE = null;
/** /**
* Get the default fill style (or null if not yet set). * 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() { export function getDefaultFillStyle() {
return DEFAULT_FILL_STYLE; return DEFAULT_FILL_STYLE;
@@ -97,13 +97,13 @@ let DEFAULT_IMAGE_STYLE_SRC;
let DEFAULT_IMAGE_SCALE_MULTIPLIER; let DEFAULT_IMAGE_SCALE_MULTIPLIER;
/** /**
* @type {ol.style.Image} * @type {module:ol/style/Image~ImageStyle}
*/ */
let DEFAULT_IMAGE_STYLE = null; let DEFAULT_IMAGE_STYLE = null;
/** /**
* Get the default image style (or null if not yet set). * 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() { export function getDefaultImageStyle() {
return DEFAULT_IMAGE_STYLE; return DEFAULT_IMAGE_STYLE;
@@ -115,57 +115,57 @@ export function getDefaultImageStyle() {
let DEFAULT_NO_IMAGE_STYLE; let DEFAULT_NO_IMAGE_STYLE;
/** /**
* @type {ol.style.Stroke} * @type {module:ol/style/Stroke~Stroke}
*/ */
let DEFAULT_STROKE_STYLE = null; let DEFAULT_STROKE_STYLE = null;
/** /**
* Get the default stroke style (or null if not yet set). * 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() { export function getDefaultStrokeStyle() {
return DEFAULT_STROKE_STYLE; return DEFAULT_STROKE_STYLE;
} }
/** /**
* @type {ol.style.Stroke} * @type {module:ol/style/Stroke~Stroke}
*/ */
let DEFAULT_TEXT_STROKE_STYLE; let DEFAULT_TEXT_STROKE_STYLE;
/** /**
* @type {ol.style.Text} * @type {module:ol/style/Text~Text}
*/ */
let DEFAULT_TEXT_STYLE = null; let DEFAULT_TEXT_STYLE = null;
/** /**
* Get the default text style (or null if not yet set). * 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() { export function getDefaultTextStyle() {
return DEFAULT_TEXT_STYLE; return DEFAULT_TEXT_STYLE;
} }
/** /**
* @type {ol.style.Style} * @type {module:ol/style/Style~Style}
*/ */
let DEFAULT_STYLE = null; let DEFAULT_STYLE = null;
/** /**
* Get the default style (or null if not yet set). * 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() { export function getDefaultStyle() {
return DEFAULT_STYLE; return DEFAULT_STYLE;
} }
/** /**
* @type {Array.<ol.style.Style>} * @type {Array.<module:ol/style/Style~Style>}
*/ */
let DEFAULT_STYLE_ARRAY = null; let DEFAULT_STYLE_ARRAY = null;
/** /**
* Get the default style array (or null if not yet set). * Get the default style array (or null if not yet set).
* @return {Array.<ol.style.Style>} The default style. * @return {Array.<module:ol/style/Style~Style>} The default style.
*/ */
export function getDefaultStyleArray() { export function getDefaultStyleArray() {
return DEFAULT_STYLE_ARRAY; return DEFAULT_STYLE_ARRAY;
@@ -234,7 +234,7 @@ function createStyleDefaults() {
/** /**
* @const * @const
* @type {Array.<ol.style.Style>} * @type {Array.<module:ol/style/Style~Style>}
* @private * @private
*/ */
DEFAULT_STYLE_ARRAY = [DEFAULT_STYLE]; DEFAULT_STYLE_ARRAY = [DEFAULT_STYLE];
@@ -246,7 +246,7 @@ function createStyleDefaults() {
* @typedef {Object} Options * @typedef {Object} Options
* @property {boolean} [extractStyles=true] Extract styles from the KML. * @property {boolean} [extractStyles=true] Extract styles from the KML.
* @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points. * @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.
* @property {Array.<ol.style.Style>} [defaultStyle] Default style. The * @property {Array.<module:ol/style/Style~Style>} [defaultStyle] Default style. The
* default default style is the same as Google Earth. * default default style is the same as Google Earth.
* @property {boolean} [writeStyles=true] Write styles into KML. * @property {boolean} [writeStyles=true] Write styles into KML.
*/ */
@@ -281,7 +281,7 @@ const KML = function(opt_options) {
/** /**
* @private * @private
* @type {Array.<ol.style.Style>} * @type {Array.<module:ol/style/Style~Style>}
*/ */
this.defaultStyle_ = options.defaultStyle ? this.defaultStyle_ = options.defaultStyle ?
options.defaultStyle : DEFAULT_STYLE_ARRAY; options.defaultStyle : DEFAULT_STYLE_ARRAY;
@@ -302,7 +302,7 @@ const KML = function(opt_options) {
/** /**
* @private * @private
* @type {!Object.<string, (Array.<ol.style.Style>|string)>} * @type {!Object.<string, (Array.<module:ol/style/Style~Style>|string)>}
*/ */
this.sharedStyles_ = {}; 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. * @param {string} name Name.
* @return {ol.style.Style} style Style. * @return {module:ol/style/Style~Style} style Style.
*/ */
function createNameStyleFunction(foundStyle, name) { function createNameStyleFunction(foundStyle, name) {
let textStyle = null; let textStyle = null;
@@ -406,10 +406,10 @@ function createNameStyleFunction(foundStyle, name) {
/** /**
* @param {Array.<ol.style.Style>|undefined} style Style. * @param {Array.<module:ol/style/Style~Style>|undefined} style Style.
* @param {string} styleUrl Style URL. * @param {string} styleUrl Style URL.
* @param {Array.<ol.style.Style>} defaultStyle Default style. * @param {Array.<module:ol/style/Style~Style>} defaultStyle Default style.
* @param {!Object.<string, (Array.<ol.style.Style>|string)>} sharedStyles Shared styles. * @param {!Object.<string, (Array.<module:ol/style/Style~Style>|string)>} sharedStyles Shared styles.
* @param {boolean|undefined} showPointNames true to show names for point placemarks. * @param {boolean|undefined} showPointNames true to show names for point placemarks.
* @return {module:ol/style~StyleFunction} Feature style function. * @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 {module:ol/Feature~Feature} feature feature.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @return {Array.<ol.style.Style>} Style. * @return {Array.<module:ol/style/Style~Style>} Style.
*/ */
function(feature, resolution) { function(feature, resolution) {
let drawName = showPointNames; let drawName = showPointNames;
/** @type {ol.style.Style|undefined} */ /** @type {module:ol/style/Style~Style|undefined} */
let nameStyle; let nameStyle;
let name = ''; let name = '';
if (drawName) { if (drawName) {
@@ -464,11 +464,11 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles,
/** /**
* @param {Array.<ol.style.Style>|string|undefined} styleValue Style value. * @param {Array.<module:ol/style/Style~Style>|string|undefined} styleValue Style value.
* @param {Array.<ol.style.Style>} defaultStyle Default style. * @param {Array.<module:ol/style/Style~Style>} defaultStyle Default style.
* @param {!Object.<string, (Array.<ol.style.Style>|string)>} sharedStyles * @param {!Object.<string, (Array.<module:ol/style/Style~Style>|string)>} sharedStyles
* Shared styles. * Shared styles.
* @return {Array.<ol.style.Style>} Style. * @return {Array.<module:ol/style/Style~Style>} Style.
*/ */
function findStyle(styleValue, defaultStyle, sharedStyles) { function findStyle(styleValue, defaultStyle, sharedStyles) {
if (Array.isArray(styleValue)) { if (Array.isArray(styleValue)) {
@@ -609,7 +609,7 @@ const STYLE_MAP_PARSERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Array.<ol.style.Style>|string|undefined} StyleMap. * @return {Array.<module:ol/style/Style~Style>|string|undefined} StyleMap.
*/ */
function readStyleMapValue(node, objectStack) { function readStyleMapValue(node, objectStack) {
return pushParseAndPop(undefined, return pushParseAndPop(undefined,
@@ -1214,7 +1214,7 @@ const STYLE_PARSERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Array.<ol.style.Style>} Style. * @return {Array.<module:ol/style/Style~Style>} Style.
*/ */
function readStyle(node, objectStack) { function readStyle(node, objectStack) {
const styleObject = pushParseAndPop( const styleObject = pushParseAndPop(
@@ -1222,23 +1222,23 @@ function readStyle(node, objectStack) {
if (!styleObject) { if (!styleObject) {
return null; return null;
} }
let fillStyle = /** @type {ol.style.Fill} */ let fillStyle = /** @type {module:ol/style/Fill~Fill} */
('fillStyle' in styleObject ? ('fillStyle' in styleObject ?
styleObject['fillStyle'] : DEFAULT_FILL_STYLE); styleObject['fillStyle'] : DEFAULT_FILL_STYLE);
const fill = /** @type {boolean|undefined} */ (styleObject['fill']); const fill = /** @type {boolean|undefined} */ (styleObject['fill']);
if (fill !== undefined && !fill) { if (fill !== undefined && !fill) {
fillStyle = null; fillStyle = null;
} }
let imageStyle = /** @type {ol.style.Image} */ let imageStyle = /** @type {module:ol/style/Image~ImageStyle} */
('imageStyle' in styleObject ? ('imageStyle' in styleObject ?
styleObject['imageStyle'] : DEFAULT_IMAGE_STYLE); styleObject['imageStyle'] : DEFAULT_IMAGE_STYLE);
if (imageStyle == DEFAULT_NO_IMAGE_STYLE) { if (imageStyle == DEFAULT_NO_IMAGE_STYLE) {
imageStyle = undefined; imageStyle = undefined;
} }
const textStyle = /** @type {ol.style.Text} */ const textStyle = /** @type {module:ol/style/Text~Text} */
('textStyle' in styleObject ? ('textStyle' in styleObject ?
styleObject['textStyle'] : DEFAULT_TEXT_STYLE); styleObject['textStyle'] : DEFAULT_TEXT_STYLE);
let strokeStyle = /** @type {ol.style.Stroke} */ let strokeStyle = /** @type {module:ol/style/Stroke~Stroke} */
('strokeStyle' in styleObject ? ('strokeStyle' in styleObject ?
styleObject['strokeStyle'] : DEFAULT_STROKE_STYLE); styleObject['strokeStyle'] : DEFAULT_STROKE_STYLE);
const outline = /** @type {boolean|undefined} */ const outline = /** @type {boolean|undefined} */
@@ -1387,7 +1387,7 @@ function pairDataParser(node, objectStack) {
if (styleUrl) { if (styleUrl) {
objectStack[objectStack.length - 1] = styleUrl; objectStack[objectStack.length - 1] = styleUrl;
} }
const Style = /** @type {ol.style.Style} */ const Style = /** @type {module:ol/style/Style~Style} */
(pairObject['Style']); (pairObject['Style']);
if (Style) { if (Style) {
objectStack[objectStack.length - 1] = Style; objectStack[objectStack.length - 1] = Style;
@@ -2341,7 +2341,7 @@ const ICON_STYLE_SERIALIZERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @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. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeIconStyle(node, style, objectStack) { function writeIconStyle(node, style, objectStack) {
@@ -2419,7 +2419,7 @@ const LABEL_STYLE_SERIALIZERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.style.Text} style style. * @param {module:ol/style/Text~Text} style style.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeLabelStyle(node, style, objectStack) { function writeLabelStyle(node, style, objectStack) {
@@ -2465,7 +2465,7 @@ const LINE_STYLE_SERIALIZERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.style.Stroke} style style. * @param {module:ol/style/Stroke~Stroke} style style.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeLineStyle(node, style, objectStack) { function writeLineStyle(node, style, objectStack) {
@@ -2848,7 +2848,7 @@ const COLOR_NODE_FACTORY = makeSimpleNodeFactory('color');
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.style.Fill} style Style. * @param {module:ol/style/Fill~Fill} style Style.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writePolyStyle(node, style, objectStack) { function writePolyStyle(node, style, objectStack) {
@@ -2894,7 +2894,7 @@ const STYLE_SERIALIZERS = makeStructureNS(
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @param {ol.style.Style} style Style. * @param {module:ol/style/Style~Style} style Style.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
*/ */
function writeStyle(node, style, objectStack) { function writeStyle(node, style, objectStack) {

View File

@@ -100,7 +100,7 @@ const Heatmap = function(opt_options) {
/** /**
* @private * @private
* @type {Array.<Array.<ol.style.Style>>} * @type {Array.<Array.<module:ol/style/Style~Style>>}
*/ */
this.styleCache_ = null; this.styleCache_ = null;

View File

@@ -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 * @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 * image and text styles, and the priority is defined by the z-index of the style. Lower z-index
* means higher priority. * means higher priority.
* @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction} [style] Layer style. See * @property {module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|ol.StyleFunction} [style] Layer style. See
* {@link ol.style} for default style which will be used if this is not defined. * {@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 {number} [maxTilesLoading=16] Maximum number tiles to load simultaneously.
* @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be
@@ -101,7 +101,7 @@ const VectorLayer = function(opt_options) {
/** /**
* User provided style. * User provided style.
* @type {ol.style.Style|Array.<ol.style.Style>|module:ol/style~StyleFunction} * @type {module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|module:ol/style~StyleFunction}
* @private * @private
*/ */
this.style_ = null; this.style_ = null;
@@ -192,7 +192,7 @@ VectorLayer.prototype.getSource;
/** /**
* Get the style for features. This returns whatever was passed to the `style` * Get the style for features. This returns whatever was passed to the `style`
* option at construction or to the `setStyle` method. * option at construction or to the `setStyle` method.
* @return {ol.style.Style|Array.<ol.style.Style>|module:ol/style~StyleFunction} * @return {module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|module:ol/style~StyleFunction}
* Layer style. * Layer style.
* @api * @api
*/ */
@@ -245,7 +245,7 @@ VectorLayer.prototype.setRenderOrder = function(renderOrder) {
* it is `null` the layer has no style (a `null` style), so only features * 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 * that have their own styles will be rendered in the layer. See
* {@link ol.style} for information on the default style. * {@link ol.style} for information on the default style.
* @param {ol.style.Style|Array.<ol.style.Style>|module:ol/style~StyleFunction|null|undefined} * @param {module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|module:ol/style~StyleFunction|null|undefined}
* style Layer style. * style Layer style.
* @api * @api
*/ */

View File

@@ -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 * 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 * means higher priority. When set to `true`, a `renderMode` of `'image'` will be overridden with
* `'hybrid'`. * `'hybrid'`.
* @property {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction} [style] Layer style. See * @property {module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|ol.StyleFunction} [style] Layer style. See
* {@link ol.style} for default style which will be used if this is not defined. * {@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 {number} [maxTilesLoading=16] Maximum number tiles to load simultaneously.
* @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be
@@ -62,7 +62,7 @@ import {assign} from '../obj.js';
* means no preloading. * means no preloading.
* @property {ol.RenderOrderFunction} [renderOrder] Render order. Function to be used when sorting * @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. * features before rendering. By default features are drawn in the order that they are created.
* @property {(ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction)} [style] Layer style. See * @property {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|ol.StyleFunction)} [style] Layer style. See
* {@link ol.style} for default style which will be used if this is not defined. * {@link ol.style} for default style which will be used if this is not defined.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error. * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
*/ */

View File

@@ -34,7 +34,7 @@ VectorContext.prototype.drawGeometry = function(geometry) {};
/** /**
* Set the rendering style. * 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) {}; VectorContext.prototype.setStyle = function(style) {};
@@ -48,7 +48,7 @@ VectorContext.prototype.drawCircle = function(circleGeometry, feature) {};
/** /**
* @param {module:ol/Feature~Feature} feature 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) {}; VectorContext.prototype.drawFeature = function(feature, style) {};
@@ -115,21 +115,21 @@ VectorContext.prototype.drawText = function(geometry, feature) {};
/** /**
* @param {ol.style.Fill} fillStyle Fill style. * @param {module:ol/style/Fill~Fill} fillStyle Fill style.
* @param {ol.style.Stroke} strokeStyle Stroke style. * @param {module:ol/style/Stroke~Stroke} strokeStyle Stroke style.
*/ */
VectorContext.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {}; 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. * @param {ol.DeclutterGroup=} opt_declutterGroup Declutter.
*/ */
VectorContext.prototype.setImageStyle = function(imageStyle, opt_declutterGroup) {}; 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. * @param {ol.DeclutterGroup=} opt_declutterGroup Declutter.
*/ */
VectorContext.prototype.setTextStyle = function(textStyle, opt_declutterGroup) {}; VectorContext.prototype.setTextStyle = function(textStyle, opt_declutterGroup) {};

View File

@@ -435,7 +435,7 @@ CanvasImmediateRenderer.prototype.drawCircle = function(geometry) {
* Set the rendering style. Note that since this is an immediate rendering API, * Set the rendering style. Note that since this is an immediate rendering API,
* any `zIndex` on the provided style will be ignored. * 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 * @override
* @api * @api
*/ */
@@ -493,7 +493,7 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) {
* {@link module:ol/layer/Vector~VectorLayer} instead. * {@link module:ol/layer/Vector~VectorLayer} instead.
* *
* @param {module:ol/Feature~Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {ol.style.Style} style Style. * @param {module:ol/style/Style~Style} style Style.
* @override * @override
* @api * @api
*/ */
@@ -811,8 +811,8 @@ CanvasImmediateRenderer.prototype.setContextTextState_ = function(textState) {
* Set the fill and stroke style for subsequent draw operations. To clear * Set the fill and stroke style for subsequent draw operations. To clear
* either fill or stroke styles, pass null for the appropriate parameter. * either fill or stroke styles, pass null for the appropriate parameter.
* *
* @param {ol.style.Fill} fillStyle Fill style. * @param {module:ol/style/Fill~Fill} fillStyle Fill style.
* @param {ol.style.Stroke} strokeStyle Stroke style. * @param {module:ol/style/Stroke~Stroke} strokeStyle Stroke style.
* @override * @override
*/ */
CanvasImmediateRenderer.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) { 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 * Set the image style for subsequent draw operations. Pass null to remove
* the image style. * the image style.
* *
* @param {ol.style.Image} imageStyle Image style. * @param {module:ol/style/Image~ImageStyle} imageStyle Image style.
* @override * @override
*/ */
CanvasImmediateRenderer.prototype.setImageStyle = function(imageStyle) { 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 * Set the text style for subsequent draw operations. Pass null to
* remove the text style. * remove the text style.
* *
* @param {ol.style.Text} textStyle Text style. * @param {module:ol/style/Text~Text} textStyle Text style.
* @override * @override
*/ */
CanvasImmediateRenderer.prototype.setTextStyle = function(textStyle) { CanvasImmediateRenderer.prototype.setTextStyle = function(textStyle) {

View File

@@ -60,25 +60,25 @@ const WebGLImmediateRenderer = function(context, center, resolution, rotation, s
/** /**
* @private * @private
* @type {ol.style.Image} * @type {module:ol/style/Image~ImageStyle}
*/ */
this.imageStyle_ = null; this.imageStyle_ = null;
/** /**
* @private * @private
* @type {ol.style.Fill} * @type {module:ol/style/Fill~Fill}
*/ */
this.fillStyle_ = null; this.fillStyle_ = null;
/** /**
* @private * @private
* @type {ol.style.Stroke} * @type {module:ol/style/Stroke~Stroke}
*/ */
this.strokeStyle_ = null; this.strokeStyle_ = null;
/** /**
* @private * @private
* @type {ol.style.Text} * @type {module:ol/style/Text~Text}
*/ */
this.textStyle_ = null; 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, * Set the rendering style. Note that since this is an immediate rendering API,
* any `zIndex` on the provided style will be ignored. * 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 * @override
* @api * @api
*/ */

View File

@@ -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. * @param {boolean} group Group with previous replay.
*/ */
WebGLReplayGroup.prototype.addDeclutter = function(style, group) {}; WebGLReplayGroup.prototype.addDeclutter = function(style, group) {};

View File

@@ -407,7 +407,7 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
* @param {module:ol/Feature~Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of * @param {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} styles The style or array of
* styles. * styles.
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group. * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
* @return {boolean} `true` if an image is loading. * @return {boolean} `true` if an image is loading.

View File

@@ -448,7 +448,7 @@ CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameSta
/** /**
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of * @param {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} styles The style or array of
* styles. * styles.
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group. * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
* @return {boolean} `true` if an image is loading. * @return {boolean} `true` if an image is loading.

View File

@@ -18,7 +18,7 @@ const SIMPLIFY_TOLERANCE = 0.5;
* @const * @const
* @type {Object.<module:ol/geom/GeometryType~GeometryType, * @type {Object.<module:ol/geom/GeometryType~GeometryType,
* function(ol.render.ReplayGroup, module:ol/geom/Geometry~Geometry, * function(ol.render.ReplayGroup, module:ol/geom/Geometry~Geometry,
* ol.style.Style, Object)>} * module:ol/style/Style~Style, Object)>}
*/ */
const GEOMETRY_RENDERERS = { const GEOMETRY_RENDERERS = {
'Point': renderPointGeometry, 'Point': renderPointGeometry,
@@ -66,7 +66,7 @@ export function getTolerance(resolution, pixelRatio) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/Circle~Circle} geometry Geometry. * @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. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
function renderCircleGeometry(replayGroup, geometry, style, 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 {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. * @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 {number} squaredTolerance Squared tolerance.
* @param {function(this: T, module:ol/events/Event~Event)} listener Listener function. * @param {function(this: T, module:ol/events/Event~Event)} listener Listener function.
* @param {T} thisArg Value to use as `this` when executing `listener`. * @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 {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. * @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 {number} squaredTolerance Squared tolerance.
*/ */
function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) { function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {
@@ -143,7 +143,7 @@ function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {
/** /**
* @param {ol.render.ReplayGroup} replayGroup Replay group. * @param {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry. * @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. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderGeometry(replayGroup, geometry, style, 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 {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry. * @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. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
function renderGeometryCollectionGeometry(replayGroup, geometry, style, 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 {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/LineString~LineString|ol.render.Feature} geometry Geometry. * @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. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderLineStringGeometry(replayGroup, geometry, style, 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 {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} geometry Geometry. * @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. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderMultiLineStringGeometry(replayGroup, geometry, style, 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 {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry. * @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. * @param {module:ol/Feature~Feature} feature Feature.
*/ */
function renderMultiPolygonGeometry(replayGroup, geometry, style, 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 {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/Point~Point|ol.render.Feature} geometry Geometry. * @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. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderPointGeometry(replayGroup, geometry, style, 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 {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} geometry Geometry. * @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. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderMultiPointGeometry(replayGroup, geometry, style, 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 {ol.render.ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} geometry Geometry. * @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. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/ */
function renderPolygonGeometry(replayGroup, geometry, style, feature) { function renderPolygonGeometry(replayGroup, geometry, style, feature) {

View File

@@ -307,7 +307,7 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
* @param {module:ol/Feature~Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of * @param {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} styles The style or array of
* styles. * styles.
* @param {ol.render.webgl.ReplayGroup} replayGroup Replay group. * @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
* @return {boolean} `true` if an image is loading. * @return {boolean} `true` if an image is loading.

View File

@@ -80,7 +80,7 @@ const AtlasManager = function(opt_options) {
/** /**
* @private * @private
* @type {Array.<ol.style.Atlas>} * @type {Array.<module:ol/style/Atlas~Atlas>}
*/ */
this.atlases_ = [new Atlas(this.currentSize_, this.space_)]; this.atlases_ = [new Atlas(this.currentSize_, this.space_)];
@@ -93,7 +93,7 @@ const AtlasManager = function(opt_options) {
/** /**
* @private * @private
* @type {Array.<ol.style.Atlas>} * @type {Array.<module:ol/style/Atlas~Atlas>}
*/ */
this.hitAtlases_ = [new Atlas(this.currentHitSize_, this.space_)]; this.hitAtlases_ = [new Atlas(this.currentHitSize_, this.space_)];
}; };
@@ -119,7 +119,7 @@ AtlasManager.prototype.getInfo = function(id) {
/** /**
* @private * @private
* @param {Array.<ol.style.Atlas>} atlases The atlases to search. * @param {Array.<module:ol/style/Atlas~Atlas>} atlases The atlases to search.
* @param {string} id The identifier of the entry to check. * @param {string} id The identifier of the entry to check.
* @return {?module:ol/style/Atlas~AtlasInfo} The position and atlas image for the entry, * @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. * or `null` if the entry is not part of the atlases.

View File

@@ -10,7 +10,7 @@ import RegularShape from '../style/RegularShape.js';
* *
* @constructor * @constructor
* @param {olx.style.CircleOptions=} opt_options Options. * @param {olx.style.CircleOptions=} opt_options Options.
* @extends {ol.style.RegularShape} * @extends {module:ol/style/RegularShape~RegularShape}
* @api * @api
*/ */
const CircleStyle = function(opt_options) { 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. * 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 * @override
* @api * @api
*/ */

View File

@@ -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}. * 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 * @api
*/ */
Fill.prototype.clone = function() { Fill.prototype.clone = function() {

View File

@@ -18,7 +18,7 @@ import ImageStyle from '../style/Image.js';
* *
* @constructor * @constructor
* @param {olx.style.IconOptions=} opt_options Options. * @param {olx.style.IconOptions=} opt_options Options.
* @extends {ol.style.Image} * @extends {module:ol/style/Image~ImageStyle}
* @api * @api
*/ */
const Icon = function(opt_options) { const Icon = function(opt_options) {
@@ -39,21 +39,21 @@ const Icon = function(opt_options) {
/** /**
* @private * @private
* @type {ol.style.IconOrigin} * @type {module:ol/style/IconOrigin~IconOrigin}
*/ */
this.anchorOrigin_ = options.anchorOrigin !== undefined ? this.anchorOrigin_ = options.anchorOrigin !== undefined ?
options.anchorOrigin : IconOrigin.TOP_LEFT; options.anchorOrigin : IconOrigin.TOP_LEFT;
/** /**
* @private * @private
* @type {ol.style.IconAnchorUnits} * @type {module:ol/style/IconAnchorUnits~IconAnchorUnits}
*/ */
this.anchorXUnits_ = options.anchorXUnits !== undefined ? this.anchorXUnits_ = options.anchorXUnits !== undefined ?
options.anchorXUnits : IconAnchorUnits.FRACTION; options.anchorXUnits : IconAnchorUnits.FRACTION;
/** /**
* @private * @private
* @type {ol.style.IconAnchorUnits} * @type {module:ol/style/IconAnchorUnits~IconAnchorUnits}
*/ */
this.anchorYUnits_ = options.anchorYUnits !== undefined ? this.anchorYUnits_ = options.anchorYUnits !== undefined ?
options.anchorYUnits : IconAnchorUnits.FRACTION; options.anchorYUnits : IconAnchorUnits.FRACTION;
@@ -105,7 +105,7 @@ const Icon = function(opt_options) {
/** /**
* @private * @private
* @type {ol.style.IconImage} * @type {module:ol/style/IconImage~IconImage}
*/ */
this.iconImage_ = getIconImage( this.iconImage_ = getIconImage(
image, /** @type {string} */ (src), imgSize, this.crossOrigin_, imageState, this.color_); image, /** @type {string} */ (src), imgSize, this.crossOrigin_, imageState, this.color_);
@@ -118,7 +118,7 @@ const Icon = function(opt_options) {
/** /**
* @private * @private
* @type {ol.style.IconOrigin} * @type {module:ol/style/IconOrigin~IconOrigin}
*/ */
this.offsetOrigin_ = options.offsetOrigin !== undefined ? this.offsetOrigin_ = options.offsetOrigin !== undefined ?
options.offsetOrigin : IconOrigin.TOP_LEFT; options.offsetOrigin : IconOrigin.TOP_LEFT;
@@ -177,7 +177,7 @@ inherits(Icon, ImageStyle);
/** /**
* Clones the style. The underlying Image/HTMLCanvasElement is not cloned. * 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 * @api
*/ */
Icon.prototype.clone = function() { Icon.prototype.clone = function() {

View File

@@ -98,7 +98,7 @@ inherits(IconImage, EventTarget);
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {module:ol/ImageState~ImageState} imageState Image state. * @param {module:ol/ImageState~ImageState} imageState Image state.
* @param {module:ol/color~Color} color Color. * @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) { export function get(image, src, size, crossOrigin, imageState, color) {
let iconImage = iconImageCache.get(src, crossOrigin, color); let iconImage = iconImageCache.get(src, crossOrigin, color);

View File

@@ -10,7 +10,7 @@ import {asString} from '../color.js';
const IconImageCache = function() { const IconImageCache = function() {
/** /**
* @type {!Object.<string, ol.style.IconImage>} * @type {!Object.<string, module:ol/style/IconImage~IconImage>}
* @private * @private
*/ */
this.cache_ = {}; this.cache_ = {};
@@ -71,7 +71,7 @@ IconImageCache.prototype.expire = function() {
* @param {string} src Src. * @param {string} src Src.
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {module:ol/color~Color} color Color. * @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) { IconImageCache.prototype.get = function(src, crossOrigin, color) {
const key = getKey(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} src Src.
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {module:ol/color~Color} color Color. * @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) { IconImageCache.prototype.set = function(src, crossOrigin, color, iconImage) {
const key = getKey(src, crossOrigin, color); const key = getKey(src, crossOrigin, color);

View File

@@ -4,8 +4,8 @@
/** /**
* @classdesc * @classdesc
* A base class used for creating subclasses and not instantiated in * A base class used for creating subclasses and not instantiated in
* apps. Base class for {@link ol.style.Icon}, {@link ol.style.Circle} and * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and
* {@link ol.style.RegularShape}. * {@link module:ol/style/RegularShape~RegularShape}.
* *
* @constructor * @constructor
* @abstract * @abstract

View File

@@ -17,7 +17,7 @@ import ImageStyle from '../style/Image.js';
* *
* @constructor * @constructor
* @param {olx.style.RegularShapeOptions} options Options. * @param {olx.style.RegularShapeOptions} options Options.
* @extends {ol.style.Image} * @extends {module:ol/style/Image~ImageStyle}
* @api * @api
*/ */
const RegularShape = function(options) { const RegularShape = function(options) {
@@ -41,7 +41,7 @@ const RegularShape = function(options) {
/** /**
* @private * @private
* @type {ol.style.Fill} * @type {module:ol/style/Fill~Fill}
*/ */
this.fill_ = options.fill !== undefined ? options.fill : null; this.fill_ = options.fill !== undefined ? options.fill : null;
@@ -78,7 +78,7 @@ const RegularShape = function(options) {
/** /**
* @private * @private
* @type {ol.style.Stroke} * @type {module:ol/style/Stroke~Stroke}
*/ */
this.stroke_ = options.stroke !== undefined ? options.stroke : null; this.stroke_ = options.stroke !== undefined ? options.stroke : null;
@@ -108,7 +108,7 @@ const RegularShape = function(options) {
/** /**
* @protected * @protected
* @type {ol.style.AtlasManager|undefined} * @type {module:ol/style/AtlasManager~AtlasManager|undefined}
*/ */
this.atlasManager_ = options.atlasManager; 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. * 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 * @api
*/ */
RegularShape.prototype.clone = function() { RegularShape.prototype.clone = function() {
@@ -183,7 +183,7 @@ RegularShape.prototype.getAngle = function() {
/** /**
* Get the fill style for the shape. * Get the fill style for the shape.
* @return {ol.style.Fill} Fill style. * @return {module:ol/style/Fill~Fill} Fill style.
* @api * @api
*/ */
RegularShape.prototype.getFill = function() { RegularShape.prototype.getFill = function() {
@@ -282,7 +282,7 @@ RegularShape.prototype.getSize = function() {
/** /**
* Get the stroke style for the shape. * Get the stroke style for the shape.
* @return {ol.style.Stroke} Stroke style. * @return {module:ol/style/Stroke~Stroke} Stroke style.
* @api * @api
*/ */
RegularShape.prototype.getStroke = function() { RegularShape.prototype.getStroke = function() {
@@ -310,7 +310,7 @@ RegularShape.prototype.unlistenImageChange = function(listener, thisArg) {};
/** /**
* @protected * @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) { RegularShape.prototype.render_ = function(atlasManager) {
let imageSize; let imageSize;

View File

@@ -70,7 +70,7 @@ const Stroke = function(opt_options) {
/** /**
* Clones the style. * Clones the style.
* @return {ol.style.Stroke} The cloned style. * @return {module:ol/style/Stroke~Stroke} The cloned style.
* @api * @api
*/ */
Stroke.prototype.clone = function() { Stroke.prototype.clone = function() {

View File

@@ -40,13 +40,13 @@ const Style = function(opt_options) {
/** /**
* @private * @private
* @type {ol.style.Fill} * @type {module:ol/style/Fill~Fill}
*/ */
this.fill_ = options.fill !== undefined ? options.fill : null; this.fill_ = options.fill !== undefined ? options.fill : null;
/** /**
* @private * @private
* @type {ol.style.Image} * @type {module:ol/style/Image~ImageStyle}
*/ */
this.image_ = options.image !== undefined ? options.image : null; this.image_ = options.image !== undefined ? options.image : null;
@@ -58,13 +58,13 @@ const Style = function(opt_options) {
/** /**
* @private * @private
* @type {ol.style.Stroke} * @type {module:ol/style/Stroke~Stroke}
*/ */
this.stroke_ = options.stroke !== undefined ? options.stroke : null; this.stroke_ = options.stroke !== undefined ? options.stroke : null;
/** /**
* @private * @private
* @type {ol.style.Text} * @type {module:ol/style/Text~Text}
*/ */
this.text_ = options.text !== undefined ? options.text : null; this.text_ = options.text !== undefined ? options.text : null;
@@ -79,7 +79,7 @@ const Style = function(opt_options) {
/** /**
* Clones the style. * Clones the style.
* @return {ol.style.Style} The cloned style. * @return {module:ol/style/Style~Style} The cloned style.
* @api * @api
*/ */
Style.prototype.clone = function() { Style.prototype.clone = function() {
@@ -145,7 +145,7 @@ Style.prototype.getGeometryFunction = function() {
/** /**
* Get the fill style. * Get the fill style.
* @return {ol.style.Fill} Fill style. * @return {module:ol/style/Fill~Fill} Fill style.
* @api * @api
*/ */
Style.prototype.getFill = function() { Style.prototype.getFill = function() {
@@ -155,7 +155,7 @@ Style.prototype.getFill = function() {
/** /**
* Set the fill style. * Set the fill style.
* @param {ol.style.Fill} fill Fill style. * @param {module:ol/style/Fill~Fill} fill Fill style.
* @api * @api
*/ */
Style.prototype.setFill = function(fill) { Style.prototype.setFill = function(fill) {
@@ -165,7 +165,7 @@ Style.prototype.setFill = function(fill) {
/** /**
* Get the image style. * Get the image style.
* @return {ol.style.Image} Image style. * @return {module:ol/style/Image~ImageStyle} Image style.
* @api * @api
*/ */
Style.prototype.getImage = function() { Style.prototype.getImage = function() {
@@ -175,7 +175,7 @@ Style.prototype.getImage = function() {
/** /**
* Set the image style. * Set the image style.
* @param {ol.style.Image} image Image style. * @param {module:ol/style/Image~ImageStyle} image Image style.
* @api * @api
*/ */
Style.prototype.setImage = function(image) { Style.prototype.setImage = function(image) {
@@ -185,7 +185,7 @@ Style.prototype.setImage = function(image) {
/** /**
* Get the stroke style. * Get the stroke style.
* @return {ol.style.Stroke} Stroke style. * @return {module:ol/style/Stroke~Stroke} Stroke style.
* @api * @api
*/ */
Style.prototype.getStroke = function() { Style.prototype.getStroke = function() {
@@ -195,7 +195,7 @@ Style.prototype.getStroke = function() {
/** /**
* Set the stroke style. * Set the stroke style.
* @param {ol.style.Stroke} stroke Stroke style. * @param {module:ol/style/Stroke~Stroke} stroke Stroke style.
* @api * @api
*/ */
Style.prototype.setStroke = function(stroke) { Style.prototype.setStroke = function(stroke) {
@@ -205,7 +205,7 @@ Style.prototype.setStroke = function(stroke) {
/** /**
* Get the text style. * Get the text style.
* @return {ol.style.Text} Text style. * @return {module:ol/style/Text~Text} Text style.
* @api * @api
*/ */
Style.prototype.getText = function() { Style.prototype.getText = function() {
@@ -215,7 +215,7 @@ Style.prototype.getText = function() {
/** /**
* Set the text style. * Set the text style.
* @param {ol.style.Text} text Text style. * @param {module:ol/style/Text~Text} text Text style.
* @api * @api
*/ */
Style.prototype.setText = function(text) { 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 * 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. * new style function.
* @param {module:ol/style~StyleFunction|Array.<ol.style.Style>|ol.style.Style} obj * @param {module:ol/style~StyleFunction|Array.<module:ol/style/Style~Style>|module:ol/style/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 {module:ol/style~StyleFunction} A style function. * @return {module:ol/style~StyleFunction} A style function.
*/ */
@@ -285,14 +285,14 @@ export function toFunction(obj) {
styleFunction = obj; styleFunction = obj;
} else { } else {
/** /**
* @type {Array.<ol.style.Style>} * @type {Array.<module:ol/style/Style~Style>}
*/ */
let styles; let styles;
if (Array.isArray(obj)) { if (Array.isArray(obj)) {
styles = obj; styles = obj;
} else { } else {
assert(obj instanceof Style, 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]; styles = [obj];
} }
styleFunction = function() { styleFunction = function() {
@@ -304,7 +304,7 @@ export function toFunction(obj) {
/** /**
* @type {Array.<ol.style.Style>} * @type {Array.<module:ol/style/Style~Style>}
*/ */
let defaultStyles = null; let defaultStyles = null;
@@ -312,12 +312,12 @@ let defaultStyles = null;
/** /**
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @return {Array.<ol.style.Style>} Style. * @return {Array.<module:ol/style/Style~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
// and a closure so we don't get an error at script evaluation time in // 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 // canvas.getContext('2d') at construction time, which will cause an.error
// in such browsers.) // in such browsers.)
if (!defaultStyles) { if (!defaultStyles) {
@@ -346,10 +346,10 @@ export function createDefaultStyle(feature, resolution) {
/** /**
* Default styles for editing features. * Default styles for editing features.
* @return {Object.<module:ol/geom/GeometryType~GeometryType, Array.<ol.style.Style>>} Styles * @return {Object.<module:ol/geom/GeometryType~GeometryType, Array.<module:ol/style/Style~Style>>} Styles
*/ */
export function createEditingStyle() { export function createEditingStyle() {
/** @type {Object.<module:ol/geom/GeometryType~GeometryType, Array.<ol.style.Style>>} */ /** @type {Object.<module:ol/geom/GeometryType~GeometryType, Array.<module:ol/style/Style~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];

View File

@@ -70,7 +70,7 @@ const Text = function(opt_options) {
/** /**
* @private * @private
* @type {ol.style.Fill} * @type {module:ol/style/Fill~Fill}
*/ */
this.fill_ = options.fill !== undefined ? options.fill : this.fill_ = options.fill !== undefined ? options.fill :
new Fill({color: DEFAULT_FILL_COLOR}); new Fill({color: DEFAULT_FILL_COLOR});
@@ -83,7 +83,7 @@ const Text = function(opt_options) {
/** /**
* @private * @private
* @type {ol.style.TextPlacement|string} * @type {module:ol/style/Text~TextPlacement|string}
*/ */
this.placement_ = options.placement !== undefined ? options.placement : TextPlacement.POINT; this.placement_ = options.placement !== undefined ? options.placement : TextPlacement.POINT;
@@ -95,7 +95,7 @@ const Text = function(opt_options) {
/** /**
* @private * @private
* @type {ol.style.Stroke} * @type {module:ol/style/Stroke~Stroke}
*/ */
this.stroke_ = options.stroke !== undefined ? options.stroke : null; this.stroke_ = options.stroke !== undefined ? options.stroke : null;
@@ -113,13 +113,13 @@ const Text = function(opt_options) {
/** /**
* @private * @private
* @type {ol.style.Fill} * @type {module:ol/style/Fill~Fill}
*/ */
this.backgroundFill_ = options.backgroundFill ? options.backgroundFill : null; this.backgroundFill_ = options.backgroundFill ? options.backgroundFill : null;
/** /**
* @private * @private
* @type {ol.style.Stroke} * @type {module:ol/style/Stroke~Stroke}
*/ */
this.backgroundStroke_ = options.backgroundStroke ? options.backgroundStroke : null; this.backgroundStroke_ = options.backgroundStroke ? options.backgroundStroke : null;
@@ -133,7 +133,7 @@ const Text = function(opt_options) {
/** /**
* Clones the style. * Clones the style.
* @return {ol.style.Text} The cloned style. * @return {module:ol/style/Text~Text} The cloned style.
* @api * @api
*/ */
Text.prototype.clone = function() { Text.prototype.clone = function() {
@@ -190,7 +190,7 @@ Text.prototype.getMaxAngle = function() {
/** /**
* Get the label placement. * Get the label placement.
* @return {ol.style.TextPlacement|string} Text placement. * @return {module:ol/style/Text~TextPlacement|string} Text placement.
* @api * @api
*/ */
Text.prototype.getPlacement = function() { Text.prototype.getPlacement = function() {
@@ -220,7 +220,7 @@ Text.prototype.getOffsetY = function() {
/** /**
* Get the fill style for the text. * Get the fill style for the text.
* @return {ol.style.Fill} Fill style. * @return {module:ol/style/Fill~Fill} Fill style.
* @api * @api
*/ */
Text.prototype.getFill = function() { Text.prototype.getFill = function() {
@@ -260,7 +260,7 @@ Text.prototype.getScale = function() {
/** /**
* Get the stroke style for the text. * Get the stroke style for the text.
* @return {ol.style.Stroke} Stroke style. * @return {module:ol/style/Stroke~Stroke} Stroke style.
* @api * @api
*/ */
Text.prototype.getStroke = function() { Text.prototype.getStroke = function() {
@@ -300,7 +300,7 @@ Text.prototype.getTextBaseline = function() {
/** /**
* Get the background fill style for the text. * Get the background fill style for the text.
* @return {ol.style.Fill} Fill style. * @return {module:ol/style/Fill~Fill} Fill style.
* @api * @api
*/ */
Text.prototype.getBackgroundFill = function() { Text.prototype.getBackgroundFill = function() {
@@ -310,7 +310,7 @@ Text.prototype.getBackgroundFill = function() {
/** /**
* Get the background stroke style for the text. * Get the background stroke style for the text.
* @return {ol.style.Stroke} Stroke style. * @return {module:ol/style/Stroke~Stroke} Stroke style.
* @api * @api
*/ */
Text.prototype.getBackgroundStroke = function() { Text.prototype.getBackgroundStroke = function() {
@@ -386,7 +386,7 @@ Text.prototype.setOffsetY = function(offsetY) {
/** /**
* Set the text placement. * Set the text placement.
* *
* @param {ol.style.TextPlacement|string} placement Placement. * @param {module:ol/style/Text~TextPlacement|string} placement Placement.
* @api * @api
*/ */
Text.prototype.setPlacement = function(placement) { Text.prototype.setPlacement = function(placement) {
@@ -397,7 +397,7 @@ Text.prototype.setPlacement = function(placement) {
/** /**
* Set the fill. * Set the fill.
* *
* @param {ol.style.Fill} fill Fill style. * @param {module:ol/style/Fill~Fill} fill Fill style.
* @api * @api
*/ */
Text.prototype.setFill = function(fill) { Text.prototype.setFill = function(fill) {
@@ -430,7 +430,7 @@ Text.prototype.setScale = function(scale) {
/** /**
* Set the stroke. * Set the stroke.
* *
* @param {ol.style.Stroke} stroke Stroke style. * @param {module:ol/style/Stroke~Stroke} stroke Stroke style.
* @api * @api
*/ */
Text.prototype.setStroke = function(stroke) { Text.prototype.setStroke = function(stroke) {
@@ -474,7 +474,7 @@ Text.prototype.setTextBaseline = function(textBaseline) {
/** /**
* Set the background fill. * Set the background fill.
* *
* @param {ol.style.Fill} fill Fill style. * @param {module:ol/style/Fill~Fill} fill Fill style.
* @api * @api
*/ */
Text.prototype.setBackgroundFill = function(fill) { Text.prototype.setBackgroundFill = function(fill) {
@@ -485,7 +485,7 @@ Text.prototype.setBackgroundFill = function(fill) {
/** /**
* Set the background stroke. * Set the background stroke.
* *
* @param {ol.style.Stroke} stroke Stroke style. * @param {module:ol/style/Stroke~Stroke} stroke Stroke style.
* @api * @api
*/ */
Text.prototype.setBackgroundStroke = function(stroke) { Text.prototype.setBackgroundStroke = function(stroke) {