Merge pull request #7997 from fredj/jsdoc_module

Jsdoc module
This commit is contained in:
Frédéric Junod
2018-03-19 10:26:09 +01:00
committed by GitHub
37 changed files with 82 additions and 103 deletions
-1
View File
@@ -592,7 +592,6 @@ Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
/** /**
* returns the options this Overlay has been created with * returns the options this Overlay has been created with
* @public
* @return {module:ol/Overlay~OverlayOptions} overlay options * @return {module:ol/Overlay~OverlayOptions} overlay options
*/ */
Overlay.prototype.getOptions = function() { Overlay.prototype.getOptions = function() {
+3 -3
View File
@@ -68,7 +68,7 @@ const Control = function(options) {
/** /**
* @private * @private
* @type {ol.PluggableMap} * @type {module:ol/PluggableMap~PluggableMap}
*/ */
this.map_ = null; this.map_ = null;
@@ -103,7 +103,7 @@ Control.prototype.disposeInternal = function() {
/** /**
* Get the map associated with this control. * Get the map associated with this control.
* @return {ol.PluggableMap} Map. * @return {module:ol/PluggableMap~PluggableMap} Map.
* @api * @api
*/ */
Control.prototype.getMap = function() { Control.prototype.getMap = function() {
@@ -115,7 +115,7 @@ Control.prototype.getMap = function() {
* Remove the control from its current map and attach it to the new map. * Remove the control from its current map and attach it to the new map.
* Subclasses may set up event handlers to get notified about changes to * Subclasses may set up event handlers to get notified about changes to
* the map here. * the map here.
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @override * @override
* @api * @api
*/ */
+2 -2
View File
@@ -136,7 +136,7 @@ const OverviewMap = function(opt_options) {
this.ovmapDiv_.className = 'ol-overviewmap-map'; this.ovmapDiv_.className = 'ol-overviewmap-map';
/** /**
* @type {ol.PluggableMap} * @type {module:ol/PluggableMap~PluggableMap}
* @private * @private
*/ */
this.ovmap_ = new PluggableMap({ this.ovmap_ = new PluggableMap({
@@ -588,7 +588,7 @@ OverviewMap.prototype.getCollapsed = function() {
/** /**
* Return the overview map. * Return the overview map.
* @return {ol.PluggableMap} Overview map. * @return {module:ol/PluggableMap~PluggableMap} Overview map.
* @api * @api
*/ */
OverviewMap.prototype.getOverviewMap = function() { OverviewMap.prototype.getOverviewMap = function() {
+6 -6
View File
@@ -35,7 +35,7 @@ import {createElementNS, getAllTextContent, isDocument, isNode, makeArrayExtende
/** /**
* @type {ol.Color} * @type {module:ol/color~Color}
*/ */
let DEFAULT_COLOR; let DEFAULT_COLOR;
@@ -477,7 +477,7 @@ function findStyle(styleValue, defaultStyle, sharedStyles) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @return {ol.Color|undefined} Color. * @return {module:ol/color~Color|undefined} Color.
*/ */
function readColor(node) { function readColor(node) {
const s = getAllTextContent(node, false); const s = getAllTextContent(node, false);
@@ -746,7 +746,7 @@ function labelStyleParser(node, objectStack) {
const styleObject = objectStack[objectStack.length - 1]; const styleObject = objectStack[objectStack.length - 1];
const textStyle = new Text({ const textStyle = new Text({
fill: new Fill({ fill: new Fill({
color: /** @type {ol.Color} */ color: /** @type {module:ol/color~Color} */
('color' in object ? object['color'] : DEFAULT_COLOR) ('color' in object ? object['color'] : DEFAULT_COLOR)
}), }),
scale: /** @type {number|undefined} */ scale: /** @type {number|undefined} */
@@ -784,7 +784,7 @@ function lineStyleParser(node, objectStack) {
} }
const styleObject = objectStack[objectStack.length - 1]; const styleObject = objectStack[objectStack.length - 1];
const strokeStyle = new Stroke({ const strokeStyle = new Stroke({
color: /** @type {ol.Color} */ color: /** @type {module:ol/color~Color} */
('color' in object ? object['color'] : DEFAULT_COLOR), ('color' in object ? object['color'] : DEFAULT_COLOR),
width: /** @type {number} */ ('width' in object ? object['width'] : 1) width: /** @type {number} */ ('width' in object ? object['width'] : 1)
}); });
@@ -817,7 +817,7 @@ function polyStyleParser(node, objectStack) {
} }
const styleObject = objectStack[objectStack.length - 1]; const styleObject = objectStack[objectStack.length - 1];
const fillStyle = new Fill({ const fillStyle = new Fill({
color: /** @type {ol.Color} */ color: /** @type {module:ol/color~Color} */
('color' in object ? object['color'] : DEFAULT_COLOR) ('color' in object ? object['color'] : DEFAULT_COLOR)
}); });
styleObject['fillStyle'] = fillStyle; styleObject['fillStyle'] = fillStyle;
@@ -2067,7 +2067,7 @@ KML.prototype.readProjection;
/** /**
* @param {Node} node Node to append a TextNode with the color to. * @param {Node} node Node to append a TextNode with the color to.
* @param {ol.Color|string} color Color. * @param {module:ol/color~Color|string} color Color.
*/ */
function writeColorTextNode(node, color) { function writeColorTextNode(node, color) {
const rgba = asArray(color); const rgba = asArray(color);
-3
View File
@@ -22,19 +22,16 @@ const Bbox = function(geometryName, extent, opt_srsName) {
Filter.call(this, 'BBOX'); Filter.call(this, 'BBOX');
/** /**
* @public
* @type {!string} * @type {!string}
*/ */
this.geometryName = geometryName; this.geometryName = geometryName;
/** /**
* @public
* @type {module:ol/extent~Extent} * @type {module:ol/extent~Extent}
*/ */
this.extent = extent; this.extent = extent;
/** /**
* @public
* @type {string|undefined} * @type {string|undefined}
*/ */
this.srsName = opt_srsName; this.srsName = opt_srsName;
-1
View File
@@ -20,7 +20,6 @@ const Comparison = function(tagName, propertyName) {
Filter.call(this, tagName); Filter.call(this, tagName);
/** /**
* @public
* @type {!string} * @type {!string}
*/ */
this.propertyName = propertyName; this.propertyName = propertyName;
-2
View File
@@ -22,13 +22,11 @@ const ComparisonBinary = function(tagName, propertyName, expression, opt_matchCa
Comparison.call(this, tagName, propertyName); Comparison.call(this, tagName, propertyName);
/** /**
* @public
* @type {!(string|number)} * @type {!(string|number)}
*/ */
this.expression = expression; this.expression = expression;
/** /**
* @public
* @type {boolean|undefined} * @type {boolean|undefined}
*/ */
this.matchCase = opt_matchCase; this.matchCase = opt_matchCase;
-2
View File
@@ -19,13 +19,11 @@ const During = function(propertyName, begin, end) {
Comparison.call(this, 'During', propertyName); Comparison.call(this, 'During', propertyName);
/** /**
* @public
* @type {!string} * @type {!string}
*/ */
this.begin = begin; this.begin = begin;
/** /**
* @public
* @type {!string} * @type {!string}
*/ */
this.end = end; this.end = end;
-2
View File
@@ -19,13 +19,11 @@ const IsBetween = function(propertyName, lowerBoundary, upperBoundary) {
Comparison.call(this, 'PropertyIsBetween', propertyName); Comparison.call(this, 'PropertyIsBetween', propertyName);
/** /**
* @public
* @type {!number} * @type {!number}
*/ */
this.lowerBoundary = lowerBoundary; this.lowerBoundary = lowerBoundary;
/** /**
* @public
* @type {!number} * @type {!number}
*/ */
this.upperBoundary = upperBoundary; this.upperBoundary = upperBoundary;
-5
View File
@@ -25,31 +25,26 @@ const IsLike = function(propertyName, pattern, opt_wildCard, opt_singleChar, opt
Comparison.call(this, 'PropertyIsLike', propertyName); Comparison.call(this, 'PropertyIsLike', propertyName);
/** /**
* @public
* @type {!string} * @type {!string}
*/ */
this.pattern = pattern; this.pattern = pattern;
/** /**
* @public
* @type {!string} * @type {!string}
*/ */
this.wildCard = (opt_wildCard !== undefined) ? opt_wildCard : '*'; this.wildCard = (opt_wildCard !== undefined) ? opt_wildCard : '*';
/** /**
* @public
* @type {!string} * @type {!string}
*/ */
this.singleChar = (opt_singleChar !== undefined) ? opt_singleChar : '.'; this.singleChar = (opt_singleChar !== undefined) ? opt_singleChar : '.';
/** /**
* @public
* @type {!string} * @type {!string}
*/ */
this.escapeChar = (opt_escapeChar !== undefined) ? opt_escapeChar : '!'; this.escapeChar = (opt_escapeChar !== undefined) ? opt_escapeChar : '!';
/** /**
* @public
* @type {boolean|undefined} * @type {boolean|undefined}
*/ */
this.matchCase = opt_matchCase; this.matchCase = opt_matchCase;
-1
View File
@@ -21,7 +21,6 @@ const LogicalNary = function(tagName, conditions) {
Filter.call(this, tagName); Filter.call(this, tagName);
/** /**
* @public
* @type {Array.<ol.format.filter.Filter>} * @type {Array.<ol.format.filter.Filter>}
*/ */
this.conditions = Array.prototype.slice.call(arguments, 1); this.conditions = Array.prototype.slice.call(arguments, 1);
-1
View File
@@ -18,7 +18,6 @@ const Not = function(condition) {
Filter.call(this, 'Not'); Filter.call(this, 'Not');
/** /**
* @public
* @type {!ol.format.filter.Filter} * @type {!ol.format.filter.Filter}
*/ */
this.condition = condition; this.condition = condition;
-3
View File
@@ -24,19 +24,16 @@ const Spatial = function(tagName, geometryName, geometry, opt_srsName) {
Filter.call(this, tagName); Filter.call(this, tagName);
/** /**
* @public
* @type {!string} * @type {!string}
*/ */
this.geometryName = geometryName || 'the_geom'; this.geometryName = geometryName || 'the_geom';
/** /**
* @public
* @type {module:ol/geom/Geometry~Geometry} * @type {module:ol/geom/Geometry~Geometry}
*/ */
this.geometry = geometry; this.geometry = geometry;
/** /**
* @public
* @type {string|undefined} * @type {string|undefined}
*/ */
this.srsName = opt_srsName; this.srsName = opt_srsName;
+5 -5
View File
@@ -11,7 +11,7 @@ import {getValues} from '../obj.js';
/** /**
* @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event. * @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event.
* @this {module:ol/interaction/Pointer~Pointer} * @this {module:ol/interaction/Pointer~PointerInteraction}
*/ */
const handleDragEvent = UNDEFINED; const handleDragEvent = UNDEFINED;
@@ -19,7 +19,7 @@ const handleDragEvent = UNDEFINED;
/** /**
* @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event. * @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event.
* @return {boolean} Capture dragging. * @return {boolean} Capture dragging.
* @this {module:ol/interaction/Pointer~Pointer} * @this {module:ol/interaction/Pointer~PointerInteraction}
*/ */
const handleUpEvent = FALSE; const handleUpEvent = FALSE;
@@ -27,14 +27,14 @@ const handleUpEvent = FALSE;
/** /**
* @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event. * @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event.
* @return {boolean} Capture dragging. * @return {boolean} Capture dragging.
* @this {module:ol/interaction/Pointer~Pointer} * @this {module:ol/interaction/Pointer~PointerInteraction}
*/ */
const handleDownEvent = FALSE; const handleDownEvent = FALSE;
/** /**
* @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event. * @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event.
* @this {module:ol/interaction/Pointer~Pointer} * @this {module:ol/interaction/Pointer~PointerInteraction}
*/ */
const handleMoveEvent = UNDEFINED; const handleMoveEvent = UNDEFINED;
@@ -194,7 +194,7 @@ PointerInteraction.prototype.updateTrackedPointers_ = function(mapBrowserEvent)
* detected. * detected.
* @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation. * @return {boolean} `false` to stop event propagation.
* @this {module:ol/interaction/Pointer~Pointer} * @this {module:ol/interaction/Pointer~PointerInteraction}
* @api * @api
*/ */
export function handleEvent(mapBrowserEvent) { export function handleEvent(mapBrowserEvent) {
+1 -1
View File
@@ -177,7 +177,7 @@ Layer.prototype.handleSourcePropertyChange_ = function() {
* *
* To add the layer to a map and have it managed by the map, use * To add the layer to a map and have it managed by the map, use
* {@link ol.Map#addLayer} instead. * {@link ol.Map#addLayer} instead.
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @api * @api
*/ */
Layer.prototype.setMap = function(map) { Layer.prototype.setMap = function(map) {
+3 -3
View File
@@ -9,7 +9,7 @@ import Polygon from '../geom/Polygon.js';
/** /**
* @constructor * @constructor
* @extends {ol.Disposable} * @extends {module:ol/Disposable~Disposable}
* @param {string} className CSS class name. * @param {string} className CSS class name.
*/ */
const RenderBox = function(className) { const RenderBox = function(className) {
@@ -30,7 +30,7 @@ const RenderBox = function(className) {
/** /**
* @private * @private
* @type {ol.PluggableMap} * @type {module:ol/PluggableMap~PluggableMap}
*/ */
this.map_ = null; this.map_ = null;
@@ -75,7 +75,7 @@ RenderBox.prototype.render_ = function() {
/** /**
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
*/ */
RenderBox.prototype.setMap = function(map) { RenderBox.prototype.setMap = function(map) {
if (this.map_) { if (this.map_) {
+2 -2
View File
@@ -17,7 +17,7 @@ export const defaultFont = '10px sans-serif';
/** /**
* @const * @const
* @type {ol.Color} * @type {module:ol/color~Color}
*/ */
export const defaultFillStyle = [0, 0, 0, 1]; export const defaultFillStyle = [0, 0, 0, 1];
@@ -59,7 +59,7 @@ export const defaultMiterLimit = 10;
/** /**
* @const * @const
* @type {ol.Color} * @type {module:ol/color~Color}
*/ */
export const defaultStrokeStyle = [0, 0, 0, 1]; export const defaultStrokeStyle = [0, 0, 0, 1];
+2 -2
View File
@@ -482,7 +482,7 @@ CanvasReplay.prototype.fill_ = function(context) {
* @param {Array.<*>} instruction Instruction. * @param {Array.<*>} instruction Instruction.
*/ */
CanvasReplay.prototype.setStrokeStyle_ = function(context, instruction) { CanvasReplay.prototype.setStrokeStyle_ = function(context, instruction) {
context.strokeStyle = /** @type {ol.ColorLike} */ (instruction[1]); context.strokeStyle = /** @type {module:ol/colorlike~ColorLike} */ (instruction[1]);
context.lineWidth = /** @type {number} */ (instruction[2]); context.lineWidth = /** @type {number} */ (instruction[2]);
context.lineCap = /** @type {string} */ (instruction[3]); context.lineCap = /** @type {string} */ (instruction[3]);
context.lineJoin = /** @type {string} */ (instruction[4]); context.lineJoin = /** @type {string} */ (instruction[4]);
@@ -814,7 +814,7 @@ CanvasReplay.prototype.replay_ = function(
} }
} }
context.fillStyle = /** @type {ol.ColorLike} */ (instruction[1]); context.fillStyle = /** @type {module:ol/colorlike~ColorLike} */ (instruction[1]);
++i; ++i;
break; break;
case CanvasInstruction.SET_STROKE_STYLE: case CanvasInstruction.SET_STROKE_STYLE:
+2 -2
View File
@@ -12,7 +12,7 @@ export const DEFAULT_FONT = '10px sans-serif';
/** /**
* @const * @const
* @type {ol.Color} * @type {module:ol/color~Color}
*/ */
export const DEFAULT_FILLSTYLE = [0.0, 0.0, 0.0, 1.0]; export const DEFAULT_FILLSTYLE = [0.0, 0.0, 0.0, 1.0];
@@ -53,7 +53,7 @@ export const DEFAULT_MITERLIMIT = 10;
/** /**
* @const * @const
* @type {ol.Color} * @type {module:ol/color~Color}
*/ */
export const DEFAULT_STROKESTYLE = [0.0, 0.0, 0.0, 1.0]; export const DEFAULT_STROKESTYLE = [0.0, 0.0, 0.0, 1.0];
+2 -2
View File
@@ -44,14 +44,14 @@ const WebGLTextReplay = function(tolerance, maxExtent) {
/** /**
* @private * @private
* @type {{strokeColor: (ol.ColorLike|null), * @type {{strokeColor: (module:ol/colorlike~ColorLike|null),
* lineCap: (string|undefined), * lineCap: (string|undefined),
* lineDash: Array.<number>, * lineDash: Array.<number>,
* lineDashOffset: (number|undefined), * lineDashOffset: (number|undefined),
* lineJoin: (string|undefined), * lineJoin: (string|undefined),
* lineWidth: number, * lineWidth: number,
* miterLimit: (number|undefined), * miterLimit: (number|undefined),
* fillColor: (ol.ColorLike|null), * fillColor: (module:ol/colorlike~ColorLike|null),
* font: (string|undefined), * font: (string|undefined),
* scale: (number|undefined)}} * scale: (number|undefined)}}
*/ */
+1 -1
View File
@@ -145,7 +145,7 @@ LayerRenderer.prototype.scheduleExpireCache = function(frameState, tileSource) {
if (tileSource.canExpireCache()) { if (tileSource.canExpireCache()) {
/** /**
* @param {ol.source.Tile} tileSource Tile source. * @param {ol.source.Tile} tileSource Tile source.
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
*/ */
const postRenderFunction = function(tileSource, map, frameState) { const postRenderFunction = function(tileSource, map, frameState) {
+6 -6
View File
@@ -15,9 +15,9 @@ import {compose as composeTransform, invert as invertTransform, setFromArray as
/** /**
* @constructor * @constructor
* @abstract * @abstract
* @extends {ol.Disposable} * @extends {module:ol/Disposable~Disposable}
* @param {Element} container Container. * @param {Element} container Container.
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @struct * @struct
*/ */
const MapRenderer = function(container, map) { const MapRenderer = function(container, map) {
@@ -26,7 +26,7 @@ const MapRenderer = function(container, map) {
/** /**
* @private * @private
* @type {ol.PluggableMap} * @type {module:ol/PluggableMap~PluggableMap}
*/ */
this.map_ = map; this.map_ = map;
@@ -78,7 +78,7 @@ MapRenderer.prototype.removeLayerRenderers = function() {
/** /**
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
*/ */
function expireIconCache(map, frameState) { function expireIconCache(map, frameState) {
@@ -246,7 +246,7 @@ MapRenderer.prototype.getLayerRenderers = function() {
/** /**
* @return {ol.PluggableMap} Map. * @return {module:ol/PluggableMap~PluggableMap} Map.
*/ */
MapRenderer.prototype.getMap = function() { MapRenderer.prototype.getMap = function() {
return this.map_; return this.map_;
@@ -293,7 +293,7 @@ MapRenderer.prototype.renderFrame = UNDEFINED;
/** /**
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @private * @private
*/ */
+2 -2
View File
@@ -21,7 +21,7 @@ import SourceState from '../../source/State.js';
* @constructor * @constructor
* @extends {ol.renderer.Map} * @extends {ol.renderer.Map}
* @param {Element} container Container. * @param {Element} container Container.
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @api * @api
*/ */
const CanvasMapRenderer = function(container, map) { const CanvasMapRenderer = function(container, map) {
@@ -76,7 +76,7 @@ CanvasMapRenderer['handles'] = function(type) {
/** /**
* Create the map renderer. * Create the map renderer.
* @param {Element} container Container. * @param {Element} container Container.
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @return {ol.renderer.canvas.Map} The map renderer. * @return {ol.renderer.canvas.Map} The map renderer.
*/ */
CanvasMapRenderer['create'] = function(container, map) { CanvasMapRenderer['create'] = function(container, map) {
+6 -6
View File
@@ -150,7 +150,7 @@ CanvasVectorTileLayerRenderer.prototype.prepareFrame = function(frameState, laye
/** /**
* @param {ol.VectorImageTile} tile Tile. * @param {module:ol/VectorImageTile~VectorImageTile} tile Tile.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @private * @private
*/ */
@@ -248,7 +248,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram
*/ */
CanvasVectorTileLayerRenderer.prototype.drawTileImage = function( CanvasVectorTileLayerRenderer.prototype.drawTileImage = function(
tile, frameState, layerState, x, y, w, h, gutter, transition) { tile, frameState, layerState, x, y, w, h, gutter, transition) {
const vectorImageTile = /** @type {ol.VectorImageTile} */ (tile); const vectorImageTile = /** @type {module:ol/VectorImageTile~VectorImageTile} */ (tile);
this.createReplayGroup_(vectorImageTile, frameState); this.createReplayGroup_(vectorImageTile, frameState);
if (this.context) { if (this.context) {
this.renderTileImage_(vectorImageTile, frameState, layerState); this.renderTileImage_(vectorImageTile, frameState, layerState);
@@ -268,7 +268,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
/** @type {!Object.<string, boolean>} */ /** @type {!Object.<string, boolean>} */
const features = {}; const features = {};
/** @type {Array.<ol.VectorImageTile>} */ /** @type {Array.<module:ol/VectorImageTile~VectorImageTile>} */
const renderedTiles = this.renderedTiles; const renderedTiles = this.renderedTiles;
const source = /** @type {ol.source.VectorTile} */ (layer.getSource()); const source = /** @type {ol.source.VectorTile} */ (layer.getSource());
@@ -309,7 +309,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
/** /**
* @param {ol.VectorTile} tile Tile. * @param {module:ol/VectorTile~VectorTile} tile Tile.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @return {module:ol/transform~Transform} transform Transform. * @return {module:ol/transform~Transform} transform Transform.
* @private * @private
@@ -385,7 +385,7 @@ CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameSta
const clips = []; const clips = [];
const zs = []; const zs = [];
for (let i = tiles.length - 1; i >= 0; --i) { for (let i = tiles.length - 1; i >= 0; --i) {
const tile = /** @type {ol.VectorImageTile} */ (tiles[i]); const tile = /** @type {module:ol/VectorImageTile~VectorImageTile} */ (tiles[i]);
if (tile.getState() == TileState.ABORT) { if (tile.getState() == TileState.ABORT) {
continue; continue;
} }
@@ -474,7 +474,7 @@ CanvasVectorTileLayerRenderer.prototype.renderFeature = function(feature, square
/** /**
* @param {ol.VectorImageTile} tile Tile. * @param {module:ol/VectorImageTile~VectorImageTile} tile Tile.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @param {module:ol/layer/Layer~State} layerState Layer state. * @param {module:ol/layer/Layer~State} layerState Layer state.
* @private * @private
+4 -4
View File
@@ -36,7 +36,7 @@ const WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;
* @constructor * @constructor
* @extends {ol.renderer.Map} * @extends {ol.renderer.Map}
* @param {Element} container Container. * @param {Element} container Container.
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @api * @api
*/ */
const WebGLMapRenderer = function(container, map) { const WebGLMapRenderer = function(container, map) {
@@ -141,7 +141,7 @@ const WebGLMapRenderer = function(container, map) {
/** /**
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {?module:ol/PluggableMap~FrameState} frameState Frame state. * @param {?module:ol/PluggableMap~FrameState} frameState Frame state.
* @return {boolean} false. * @return {boolean} false.
* @this {ol.renderer.webgl.Map} * @this {ol.renderer.webgl.Map}
@@ -186,7 +186,7 @@ WebGLMapRenderer['handles'] = function(type) {
/** /**
* Create the map renderer. * Create the map renderer.
* @param {Element} container Container. * @param {Element} container Container.
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @return {ol.renderer.webgl.Map} The map renderer. * @return {ol.renderer.webgl.Map} The map renderer.
*/ */
WebGLMapRenderer['create'] = function(container, map) { WebGLMapRenderer['create'] = function(container, map) {
@@ -310,7 +310,7 @@ WebGLMapRenderer.prototype.disposeInternal = function() {
/** /**
* @param {ol.PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @private * @private
*/ */
+1 -1
View File
@@ -53,7 +53,7 @@ const TileImage = function(options) {
/** /**
* @protected * @protected
* @type {function(new: ol.ImageTile, module:ol/tilecoord~TileCoord, ol.TileState, string, * @type {function(new: ol.ImageTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string,
* ?string, module:ol/Tile~LoadFunction, module:ol/Tile~Options=)} * ?string, module:ol/Tile~LoadFunction, module:ol/Tile~Options=)}
*/ */
this.tileClass = options.tileClass !== undefined ? this.tileClass = options.tileClass !== undefined ?
+1 -1
View File
@@ -21,7 +21,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
* @constructor * @constructor
* @extends {ol.Tile} * @extends {ol.Tile}
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
* @param {ol.TileState} state State. * @param {module:ol/TileState~TileState} state State.
* @param {string} src Image source URI. * @param {string} src Image source URI.
* @param {module:ol/extent~Extent} extent Extent of the tile. * @param {module:ol/extent~Extent} extent Extent of the tile.
* @param {boolean} preemptive Load the tile when visible (before it's needed). * @param {boolean} preemptive Load the tile when visible (before it's needed).
+2 -2
View File
@@ -62,7 +62,7 @@ const VectorTileSource = function(options) {
/** /**
* @private * @private
* @type {Object.<string,ol.VectorTile>} * @type {Object.<string, module:ol/VectorTile~VectorTile>}
*/ */
this.sourceTiles_ = {}; this.sourceTiles_ = {};
@@ -74,7 +74,7 @@ const VectorTileSource = function(options) {
/** /**
* @protected * @protected
* @type {function(new: ol.VectorTile, module:ol/tilecoord~TileCoord, ol.TileState, string, * @type {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string,
* ol.format.Feature, module:ol/Tile~LoadFunction)} * ol.format.Feature, module:ol/Tile~LoadFunction)}
*/ */
this.tileClass = options.tileClass ? options.tileClass : VectorTile; this.tileClass = options.tileClass ? options.tileClass : VectorTile;
+1 -1
View File
@@ -28,7 +28,7 @@ const TierSizeCalculation = {
* @extends {ol.ImageTile} * @extends {ol.ImageTile}
* @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid TileGrid that the tile belongs to. * @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid TileGrid that the tile belongs to.
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
* @param {ol.TileState} state State. * @param {module:ol/TileState~TileState} state State.
* @param {string} src Image source URI. * @param {string} src Image source URI.
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function. * @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
+4 -4
View File
@@ -18,7 +18,7 @@ const Fill = function(opt_options) {
/** /**
* @private * @private
* @type {ol.Color|ol.ColorLike} * @type {module:ol/color~Color|module:ol/colorlike~ColorLike}
*/ */
this.color_ = options.color !== undefined ? options.color : null; this.color_ = options.color !== undefined ? options.color : null;
@@ -31,7 +31,7 @@ const Fill = function(opt_options) {
/** /**
* Clones the style. The color is not cloned if it is an {@link ol.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 {ol.style.Fill} The cloned style.
* @api * @api
*/ */
@@ -45,7 +45,7 @@ Fill.prototype.clone = function() {
/** /**
* Get the fill color. * Get the fill color.
* @return {ol.Color|ol.ColorLike} Color. * @return {module:ol/color~Color|module:ol/colorlike~ColorLike} Color.
* @api * @api
*/ */
Fill.prototype.getColor = function() { Fill.prototype.getColor = function() {
@@ -56,7 +56,7 @@ Fill.prototype.getColor = function() {
/** /**
* Set the color. * Set the color.
* *
* @param {ol.Color|ol.ColorLike} color Color. * @param {module:ol/color~Color|module:ol/colorlike~ColorLike} color Color.
* @api * @api
*/ */
Fill.prototype.setColor = function(color) { Fill.prototype.setColor = function(color) {
+3 -3
View File
@@ -92,14 +92,14 @@ const Icon = function(opt_options) {
6); // A defined and non-empty `src` or `image` must be provided 6); // A defined and non-empty `src` or `image` must be provided
/** /**
* @type {ol.ImageState} * @type {module:ol/ImageState~ImageState}
*/ */
const imageState = options.src !== undefined ? const imageState = options.src !== undefined ?
ImageState.IDLE : ImageState.LOADED; ImageState.IDLE : ImageState.LOADED;
/** /**
* @private * @private
* @type {ol.Color} * @type {module:ol/color~Color}
*/ */
this.color_ = options.color !== undefined ? asArray(options.color) : null; this.color_ = options.color !== undefined ? asArray(options.color) : null;
@@ -248,7 +248,7 @@ Icon.prototype.getAnchor = function() {
/** /**
* Get the icon color. * Get the icon color.
* @return {ol.Color} Color. * @return {module:ol/color~Color} Color.
* @api * @api
*/ */
Icon.prototype.getColor = function() { Icon.prototype.getColor = function() {
+7 -7
View File
@@ -15,8 +15,8 @@ import {iconImageCache} from '../style.js';
* @param {string|undefined} src Src. * @param {string|undefined} src Src.
* @param {module:ol/size~Size} size Size. * @param {module:ol/size~Size} size Size.
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {ol.ImageState} imageState Image state. * @param {module:ol/ImageState~ImageState} imageState Image state.
* @param {ol.Color} color Color. * @param {module:ol/color~Color} color Color.
* @extends {module:ol/events/EventTarget~EventTarget} * @extends {module:ol/events/EventTarget~EventTarget}
*/ */
const IconImage = function(image, src, size, crossOrigin, imageState, color) { const IconImage = function(image, src, size, crossOrigin, imageState, color) {
@@ -49,7 +49,7 @@ const IconImage = function(image, src, size, crossOrigin, imageState, color) {
/** /**
* @private * @private
* @type {ol.Color} * @type {module:ol/color~Color}
*/ */
this.color_ = color; this.color_ = color;
@@ -61,7 +61,7 @@ const IconImage = function(image, src, size, crossOrigin, imageState, color) {
/** /**
* @private * @private
* @type {ol.ImageState} * @type {module:ol/ImageState~ImageState}
*/ */
this.imageState_ = imageState; this.imageState_ = imageState;
@@ -96,8 +96,8 @@ inherits(IconImage, EventTarget);
* @param {string} src Src. * @param {string} src Src.
* @param {module:ol/size~Size} size Size. * @param {module:ol/size~Size} size Size.
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {ol.ImageState} imageState Image state. * @param {module:ol/ImageState~ImageState} imageState Image state.
* @param {ol.Color} color Color. * @param {module:ol/color~Color} color Color.
* @return {ol.style.IconImage} Icon image. * @return {ol.style.IconImage} Icon image.
*/ */
export function get(image, src, size, crossOrigin, imageState, color) { export function get(image, src, size, crossOrigin, imageState, color) {
@@ -169,7 +169,7 @@ IconImage.prototype.getImage = function(pixelRatio) {
/** /**
* @return {ol.ImageState} Image state. * @return {module:ol/ImageState~ImageState} Image state.
*/ */
IconImage.prototype.getImageState = function() { IconImage.prototype.getImageState = function() {
return this.imageState_; return this.imageState_;
+3 -3
View File
@@ -32,7 +32,7 @@ const IconImageCache = function() {
/** /**
* @param {string} src Src. * @param {string} src Src.
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {ol.Color} color Color. * @param {module:ol/color~Color} color Color.
* @return {string} Cache key. * @return {string} Cache key.
*/ */
function getKey(src, crossOrigin, color) { function getKey(src, crossOrigin, color) {
@@ -70,7 +70,7 @@ IconImageCache.prototype.expire = function() {
/** /**
* @param {string} src Src. * @param {string} src Src.
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {ol.Color} color Color. * @param {module:ol/color~Color} color Color.
* @return {ol.style.IconImage} Icon image. * @return {ol.style.IconImage} Icon image.
*/ */
IconImageCache.prototype.get = function(src, crossOrigin, color) { IconImageCache.prototype.get = function(src, crossOrigin, color) {
@@ -82,7 +82,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 {ol.Color} color Color. * @param {module:ol/color~Color} color Color.
* @param {ol.style.IconImage} iconImage Icon image. * @param {ol.style.IconImage} iconImage Icon image.
*/ */
IconImageCache.prototype.set = function(src, crossOrigin, color, iconImage) { IconImageCache.prototype.set = function(src, crossOrigin, color, iconImage) {
+1 -1
View File
@@ -125,7 +125,7 @@ ImageStyle.prototype.getHitDetectionImage = function(pixelRatio) {};
/** /**
* @abstract * @abstract
* @return {ol.ImageState} Image state. * @return {module:ol/ImageState~ImageState} Image state.
*/ */
ImageStyle.prototype.getImageState = function() {}; ImageStyle.prototype.getImageState = function() {};
+3 -3
View File
@@ -20,7 +20,7 @@ const Stroke = function(opt_options) {
/** /**
* @private * @private
* @type {ol.Color|ol.ColorLike} * @type {module:ol/color~Color|module:ol/colorlike~ColorLike}
*/ */
this.color_ = options.color !== undefined ? options.color : null; this.color_ = options.color !== undefined ? options.color : null;
@@ -89,7 +89,7 @@ Stroke.prototype.clone = function() {
/** /**
* Get the stroke color. * Get the stroke color.
* @return {ol.Color|ol.ColorLike} Color. * @return {module:ol/color~Color|module:ol/colorlike~ColorLike} Color.
* @api * @api
*/ */
Stroke.prototype.getColor = function() { Stroke.prototype.getColor = function() {
@@ -160,7 +160,7 @@ Stroke.prototype.getWidth = function() {
/** /**
* Set the color. * Set the color.
* *
* @param {ol.Color|ol.ColorLike} color Color. * @param {module:ol/color~Color|module:ol/colorlike~ColorLike} color Color.
* @api * @api
*/ */
Stroke.prototype.setColor = function(color) { Stroke.prototype.setColor = function(color) {
+8 -8
View File
@@ -70,7 +70,7 @@ ol.Attribution;
/** /**
* @typedef {{fillStyle: ol.ColorLike}} * @typedef {{fillStyle: module:ol/colorlike~ColorLike}}
*/ */
ol.CanvasFillState; ol.CanvasFillState;
@@ -91,8 +91,8 @@ ol.CanvasFunctionType;
/** /**
* @typedef {{currentFillStyle: (ol.ColorLike|undefined), * @typedef {{currentFillStyle: (module:ol/colorlike~ColorLike|undefined),
* currentStrokeStyle: (ol.ColorLike|undefined), * currentStrokeStyle: (module:ol/colorlike~ColorLike|undefined),
* currentLineCap: (string|undefined), * currentLineCap: (string|undefined),
* currentLineDash: Array.<number>, * currentLineDash: Array.<number>,
* currentLineDashOffset: (number|undefined), * currentLineDashOffset: (number|undefined),
@@ -100,8 +100,8 @@ ol.CanvasFunctionType;
* currentLineWidth: (number|undefined), * currentLineWidth: (number|undefined),
* currentMiterLimit: (number|undefined), * currentMiterLimit: (number|undefined),
* lastStroke: (number|undefined), * lastStroke: (number|undefined),
* fillStyle: (ol.ColorLike|undefined), * fillStyle: (module:ol/colorlike~ColorLike|undefined),
* strokeStyle: (ol.ColorLike|undefined), * strokeStyle: (module:ol/colorlike~ColorLike|undefined),
* lineCap: (string|undefined), * lineCap: (string|undefined),
* lineDash: Array.<number>, * lineDash: Array.<number>,
* lineDashOffset: (number|undefined), * lineDashOffset: (number|undefined),
@@ -119,7 +119,7 @@ ol.CanvasFillStrokeState;
* lineJoin: string, * lineJoin: string,
* lineWidth: number, * lineWidth: number,
* miterLimit: number, * miterLimit: number,
* strokeStyle: ol.ColorLike}} * strokeStyle: module:ol/colorlike~ColorLike}}
*/ */
ol.CanvasStrokeState; ol.CanvasStrokeState;
@@ -133,7 +133,7 @@ ol.CanvasTextState;
/** /**
* @typedef {{strokeStyle: (ol.ColorLike|undefined), strokeWidth: number, * @typedef {{strokeStyle: (module:ol/colorlike~ColorLike|undefined), strokeWidth: number,
* size: number, lineDash: Array.<number>}} * size: number, lineDash: Array.<number>}}
*/ */
ol.CircleRenderOptions; ol.CircleRenderOptions;
@@ -223,7 +223,7 @@ ol.RasterOperation;
/** /**
* @typedef {{ * @typedef {{
* strokeStyle: (ol.ColorLike|undefined), * strokeStyle: (module:ol/colorlike~ColorLike|undefined),
* strokeWidth: number, * strokeWidth: number,
* size: number, * size: number,
* lineCap: string, * lineCap: string,
+1 -1
View File
@@ -14,7 +14,7 @@ import ContextEventType from '../webgl/ContextEventType.js';
* A WebGL context for accessing low-level WebGL capabilities. * A WebGL context for accessing low-level WebGL capabilities.
* *
* @constructor * @constructor
* @extends {ol.Disposable} * @extends {module:ol/Disposable~Disposable}
* @param {HTMLCanvasElement} canvas Canvas. * @param {HTMLCanvasElement} canvas Canvas.
* @param {WebGLRenderingContext} gl GL. * @param {WebGLRenderingContext} gl GL.
*/ */