From f8d94bb998e97f0f5df9afa64783c6c69801cc6f Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 08:44:34 +0100 Subject: [PATCH 01/11] Remove unnecessary public jsdoc annotation --- src/ol/Overlay.js | 1 - src/ol/format/filter/Bbox.js | 3 --- src/ol/format/filter/Comparison.js | 1 - src/ol/format/filter/ComparisonBinary.js | 2 -- src/ol/format/filter/During.js | 2 -- src/ol/format/filter/IsBetween.js | 2 -- src/ol/format/filter/IsLike.js | 5 ----- src/ol/format/filter/LogicalNary.js | 1 - src/ol/format/filter/Not.js | 1 - src/ol/format/filter/Spatial.js | 3 --- 10 files changed, 21 deletions(-) diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index eea30b2386..347e0b0f92 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -592,7 +592,6 @@ Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) { /** * returns the options this Overlay has been created with - * @public * @return {module:ol/Overlay~OverlayOptions} overlay options */ Overlay.prototype.getOptions = function() { diff --git a/src/ol/format/filter/Bbox.js b/src/ol/format/filter/Bbox.js index 49f66dccd6..32743495f7 100644 --- a/src/ol/format/filter/Bbox.js +++ b/src/ol/format/filter/Bbox.js @@ -22,19 +22,16 @@ const Bbox = function(geometryName, extent, opt_srsName) { Filter.call(this, 'BBOX'); /** - * @public * @type {!string} */ this.geometryName = geometryName; /** - * @public * @type {module:ol/extent~Extent} */ this.extent = extent; /** - * @public * @type {string|undefined} */ this.srsName = opt_srsName; diff --git a/src/ol/format/filter/Comparison.js b/src/ol/format/filter/Comparison.js index 0ada715ad1..df8d968268 100644 --- a/src/ol/format/filter/Comparison.js +++ b/src/ol/format/filter/Comparison.js @@ -20,7 +20,6 @@ const Comparison = function(tagName, propertyName) { Filter.call(this, tagName); /** - * @public * @type {!string} */ this.propertyName = propertyName; diff --git a/src/ol/format/filter/ComparisonBinary.js b/src/ol/format/filter/ComparisonBinary.js index bae55f060c..3b4ee26dee 100644 --- a/src/ol/format/filter/ComparisonBinary.js +++ b/src/ol/format/filter/ComparisonBinary.js @@ -22,13 +22,11 @@ const ComparisonBinary = function(tagName, propertyName, expression, opt_matchCa Comparison.call(this, tagName, propertyName); /** - * @public * @type {!(string|number)} */ this.expression = expression; /** - * @public * @type {boolean|undefined} */ this.matchCase = opt_matchCase; diff --git a/src/ol/format/filter/During.js b/src/ol/format/filter/During.js index 337ef0e906..8233044fc0 100644 --- a/src/ol/format/filter/During.js +++ b/src/ol/format/filter/During.js @@ -19,13 +19,11 @@ const During = function(propertyName, begin, end) { Comparison.call(this, 'During', propertyName); /** - * @public * @type {!string} */ this.begin = begin; /** - * @public * @type {!string} */ this.end = end; diff --git a/src/ol/format/filter/IsBetween.js b/src/ol/format/filter/IsBetween.js index 0c47a1ec33..1742cd3262 100644 --- a/src/ol/format/filter/IsBetween.js +++ b/src/ol/format/filter/IsBetween.js @@ -19,13 +19,11 @@ const IsBetween = function(propertyName, lowerBoundary, upperBoundary) { Comparison.call(this, 'PropertyIsBetween', propertyName); /** - * @public * @type {!number} */ this.lowerBoundary = lowerBoundary; /** - * @public * @type {!number} */ this.upperBoundary = upperBoundary; diff --git a/src/ol/format/filter/IsLike.js b/src/ol/format/filter/IsLike.js index e16f1f9b1f..fca5d6cc46 100644 --- a/src/ol/format/filter/IsLike.js +++ b/src/ol/format/filter/IsLike.js @@ -25,31 +25,26 @@ const IsLike = function(propertyName, pattern, opt_wildCard, opt_singleChar, opt Comparison.call(this, 'PropertyIsLike', propertyName); /** - * @public * @type {!string} */ this.pattern = pattern; /** - * @public * @type {!string} */ this.wildCard = (opt_wildCard !== undefined) ? opt_wildCard : '*'; /** - * @public * @type {!string} */ this.singleChar = (opt_singleChar !== undefined) ? opt_singleChar : '.'; /** - * @public * @type {!string} */ this.escapeChar = (opt_escapeChar !== undefined) ? opt_escapeChar : '!'; /** - * @public * @type {boolean|undefined} */ this.matchCase = opt_matchCase; diff --git a/src/ol/format/filter/LogicalNary.js b/src/ol/format/filter/LogicalNary.js index 51d40c2c4e..dabc12968f 100644 --- a/src/ol/format/filter/LogicalNary.js +++ b/src/ol/format/filter/LogicalNary.js @@ -21,7 +21,6 @@ const LogicalNary = function(tagName, conditions) { Filter.call(this, tagName); /** - * @public * @type {Array.} */ this.conditions = Array.prototype.slice.call(arguments, 1); diff --git a/src/ol/format/filter/Not.js b/src/ol/format/filter/Not.js index 74f4c6f156..f927705f5b 100644 --- a/src/ol/format/filter/Not.js +++ b/src/ol/format/filter/Not.js @@ -18,7 +18,6 @@ const Not = function(condition) { Filter.call(this, 'Not'); /** - * @public * @type {!ol.format.filter.Filter} */ this.condition = condition; diff --git a/src/ol/format/filter/Spatial.js b/src/ol/format/filter/Spatial.js index a170f67594..8d2d01ba6b 100644 --- a/src/ol/format/filter/Spatial.js +++ b/src/ol/format/filter/Spatial.js @@ -24,19 +24,16 @@ const Spatial = function(tagName, geometryName, geometry, opt_srsName) { Filter.call(this, tagName); /** - * @public * @type {!string} */ this.geometryName = geometryName || 'the_geom'; /** - * @public * @type {module:ol/geom/Geometry~Geometry} */ this.geometry = geometry; /** - * @public * @type {string|undefined} */ this.srsName = opt_srsName; From 3ccd4c08266afac666d85af00223c451b32b0e58 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 08:48:28 +0100 Subject: [PATCH 02/11] Module type for ol.Disposable --- src/ol/render/Box.js | 2 +- src/ol/renderer/Map.js | 2 +- src/ol/webgl/Context.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ol/render/Box.js b/src/ol/render/Box.js index 18ebb9b8a7..b7957717dd 100644 --- a/src/ol/render/Box.js +++ b/src/ol/render/Box.js @@ -9,7 +9,7 @@ import Polygon from '../geom/Polygon.js'; /** * @constructor - * @extends {ol.Disposable} + * @extends {module:ol/Disposable~Disposable} * @param {string} className CSS class name. */ const RenderBox = function(className) { diff --git a/src/ol/renderer/Map.js b/src/ol/renderer/Map.js index 566bca4db3..205252da17 100644 --- a/src/ol/renderer/Map.js +++ b/src/ol/renderer/Map.js @@ -15,7 +15,7 @@ import {compose as composeTransform, invert as invertTransform, setFromArray as /** * @constructor * @abstract - * @extends {ol.Disposable} + * @extends {module:ol/Disposable~Disposabl} * @param {Element} container Container. * @param {ol.PluggableMap} map Map. * @struct diff --git a/src/ol/webgl/Context.js b/src/ol/webgl/Context.js index 81430f05e5..7909f24214 100644 --- a/src/ol/webgl/Context.js +++ b/src/ol/webgl/Context.js @@ -14,7 +14,7 @@ import ContextEventType from '../webgl/ContextEventType.js'; * A WebGL context for accessing low-level WebGL capabilities. * * @constructor - * @extends {ol.Disposable} + * @extends {module:ol/Disposable~Disposable} * @param {HTMLCanvasElement} canvas Canvas. * @param {WebGLRenderingContext} gl GL. */ From 2d9014ce11864e661d0535e47b215a9c992f0a71 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 08:49:56 +0100 Subject: [PATCH 03/11] Module type for ol.PluggableMap --- src/ol/control/Control.js | 6 +++--- src/ol/control/OverviewMap.js | 4 ++-- src/ol/layer/Layer.js | 2 +- src/ol/render/Box.js | 4 ++-- src/ol/renderer/Layer.js | 2 +- src/ol/renderer/Map.js | 10 +++++----- src/ol/renderer/canvas/Map.js | 4 ++-- src/ol/renderer/webgl/Map.js | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/ol/control/Control.js b/src/ol/control/Control.js index 9690ddcdb7..5509ae7e74 100644 --- a/src/ol/control/Control.js +++ b/src/ol/control/Control.js @@ -68,7 +68,7 @@ const Control = function(options) { /** * @private - * @type {ol.PluggableMap} + * @type {module:ol/PluggableMap~PluggableMap} */ this.map_ = null; @@ -103,7 +103,7 @@ Control.prototype.disposeInternal = function() { /** * Get the map associated with this control. - * @return {ol.PluggableMap} Map. + * @return {module:ol/PluggableMap~PluggableMap} Map. * @api */ 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. * Subclasses may set up event handlers to get notified about changes to * the map here. - * @param {ol.PluggableMap} map Map. + * @param {module:ol/PluggableMap~PluggableMap} map Map. * @override * @api */ diff --git a/src/ol/control/OverviewMap.js b/src/ol/control/OverviewMap.js index 9f99531d00..9e79f01dd9 100644 --- a/src/ol/control/OverviewMap.js +++ b/src/ol/control/OverviewMap.js @@ -136,7 +136,7 @@ const OverviewMap = function(opt_options) { this.ovmapDiv_.className = 'ol-overviewmap-map'; /** - * @type {ol.PluggableMap} + * @type {module:ol/PluggableMap~PluggableMap} * @private */ this.ovmap_ = new PluggableMap({ @@ -588,7 +588,7 @@ OverviewMap.prototype.getCollapsed = function() { /** * Return the overview map. - * @return {ol.PluggableMap} Overview map. + * @return {module:ol/PluggableMap~PluggableMap} Overview map. * @api */ OverviewMap.prototype.getOverviewMap = function() { diff --git a/src/ol/layer/Layer.js b/src/ol/layer/Layer.js index 5ff9445865..1d1b1d6d18 100644 --- a/src/ol/layer/Layer.js +++ b/src/ol/layer/Layer.js @@ -177,7 +177,7 @@ Layer.prototype.handleSourcePropertyChange_ = function() { * * To add the layer to a map and have it managed by the map, use * {@link ol.Map#addLayer} instead. - * @param {ol.PluggableMap} map Map. + * @param {module:ol/PluggableMap~PluggableMap} map Map. * @api */ Layer.prototype.setMap = function(map) { diff --git a/src/ol/render/Box.js b/src/ol/render/Box.js index b7957717dd..b24bb5684d 100644 --- a/src/ol/render/Box.js +++ b/src/ol/render/Box.js @@ -30,7 +30,7 @@ const RenderBox = function(className) { /** * @private - * @type {ol.PluggableMap} + * @type {module:ol/PluggableMap~PluggableMap} */ 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) { if (this.map_) { diff --git a/src/ol/renderer/Layer.js b/src/ol/renderer/Layer.js index 185a3ad9fb..298bfde04d 100644 --- a/src/ol/renderer/Layer.js +++ b/src/ol/renderer/Layer.js @@ -145,7 +145,7 @@ LayerRenderer.prototype.scheduleExpireCache = function(frameState, tileSource) { if (tileSource.canExpireCache()) { /** * @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. */ const postRenderFunction = function(tileSource, map, frameState) { diff --git a/src/ol/renderer/Map.js b/src/ol/renderer/Map.js index 205252da17..ec1b3d2f45 100644 --- a/src/ol/renderer/Map.js +++ b/src/ol/renderer/Map.js @@ -17,7 +17,7 @@ import {compose as composeTransform, invert as invertTransform, setFromArray as * @abstract * @extends {module:ol/Disposable~Disposabl} * @param {Element} container Container. - * @param {ol.PluggableMap} map Map. + * @param {module:ol/PluggableMap~PluggableMap} map Map. * @struct */ const MapRenderer = function(container, map) { @@ -26,7 +26,7 @@ const MapRenderer = function(container, map) { /** * @private - * @type {ol.PluggableMap} + * @type {module:ol/PluggableMap~PluggableMap} */ 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. */ 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() { 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. * @private */ diff --git a/src/ol/renderer/canvas/Map.js b/src/ol/renderer/canvas/Map.js index 9682475e17..51de18ecab 100644 --- a/src/ol/renderer/canvas/Map.js +++ b/src/ol/renderer/canvas/Map.js @@ -21,7 +21,7 @@ import SourceState from '../../source/State.js'; * @constructor * @extends {ol.renderer.Map} * @param {Element} container Container. - * @param {ol.PluggableMap} map Map. + * @param {module:ol/PluggableMap~PluggableMap} map Map. * @api */ const CanvasMapRenderer = function(container, map) { @@ -76,7 +76,7 @@ CanvasMapRenderer['handles'] = function(type) { /** * Create the map renderer. * @param {Element} container Container. - * @param {ol.PluggableMap} map Map. + * @param {module:ol/PluggableMap~PluggableMap} map Map. * @return {ol.renderer.canvas.Map} The map renderer. */ CanvasMapRenderer['create'] = function(container, map) { diff --git a/src/ol/renderer/webgl/Map.js b/src/ol/renderer/webgl/Map.js index 1768e40e47..e235de993a 100644 --- a/src/ol/renderer/webgl/Map.js +++ b/src/ol/renderer/webgl/Map.js @@ -36,7 +36,7 @@ const WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024; * @constructor * @extends {ol.renderer.Map} * @param {Element} container Container. - * @param {ol.PluggableMap} map Map. + * @param {module:ol/PluggableMap~PluggableMap} map Map. * @api */ 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. * @return {boolean} false. * @this {ol.renderer.webgl.Map} @@ -186,7 +186,7 @@ WebGLMapRenderer['handles'] = function(type) { /** * Create the map renderer. * @param {Element} container Container. - * @param {ol.PluggableMap} map Map. + * @param {module:ol/PluggableMap~PluggableMap} map Map. * @return {ol.renderer.webgl.Map} The map renderer. */ 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. * @private */ From f5aa7d786774f5464a4c43a05a83f039ba271b1d Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 09:24:32 +0100 Subject: [PATCH 04/11] Module type for ol.ColorLike --- src/ol/render/canvas/Replay.js | 4 ++-- src/ol/render/webgl/TextReplay.js | 4 ++-- src/ol/style/Fill.js | 8 ++++---- src/ol/style/Stroke.js | 6 +++--- src/ol/typedefs.js | 16 ++++++++-------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/ol/render/canvas/Replay.js b/src/ol/render/canvas/Replay.js index eb331b8612..5d743c264b 100644 --- a/src/ol/render/canvas/Replay.js +++ b/src/ol/render/canvas/Replay.js @@ -482,7 +482,7 @@ CanvasReplay.prototype.fill_ = function(context) { * @param {Array.<*>} instruction 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.lineCap = /** @type {string} */ (instruction[3]); 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; break; case CanvasInstruction.SET_STROKE_STYLE: diff --git a/src/ol/render/webgl/TextReplay.js b/src/ol/render/webgl/TextReplay.js index f287a6ea5b..57c1275c07 100644 --- a/src/ol/render/webgl/TextReplay.js +++ b/src/ol/render/webgl/TextReplay.js @@ -44,14 +44,14 @@ const WebGLTextReplay = function(tolerance, maxExtent) { /** * @private - * @type {{strokeColor: (ol.ColorLike|null), + * @type {{strokeColor: (module:ol/colorlike~ColorLike|null), * lineCap: (string|undefined), * lineDash: Array., * lineDashOffset: (number|undefined), * lineJoin: (string|undefined), * lineWidth: number, * miterLimit: (number|undefined), - * fillColor: (ol.ColorLike|null), + * fillColor: (module:ol/colorlike~ColorLike|null), * font: (string|undefined), * scale: (number|undefined)}} */ diff --git a/src/ol/style/Fill.js b/src/ol/style/Fill.js index edfd102109..b0ce0803f4 100644 --- a/src/ol/style/Fill.js +++ b/src/ol/style/Fill.js @@ -18,7 +18,7 @@ const Fill = function(opt_options) { /** * @private - * @type {ol.Color|ol.ColorLike} + * @type {ol.Color|module:ol/colorlike~ColorLike} */ 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. * @api */ @@ -45,7 +45,7 @@ Fill.prototype.clone = function() { /** * Get the fill color. - * @return {ol.Color|ol.ColorLike} Color. + * @return {ol.Color|module:ol/colorlike~ColorLike} Color. * @api */ Fill.prototype.getColor = function() { @@ -56,7 +56,7 @@ Fill.prototype.getColor = function() { /** * Set the color. * - * @param {ol.Color|ol.ColorLike} color Color. + * @param {ol.Color|module:ol/colorlike~ColorLike} color Color. * @api */ Fill.prototype.setColor = function(color) { diff --git a/src/ol/style/Stroke.js b/src/ol/style/Stroke.js index cde489a8ee..63ab1ce76b 100644 --- a/src/ol/style/Stroke.js +++ b/src/ol/style/Stroke.js @@ -20,7 +20,7 @@ const Stroke = function(opt_options) { /** * @private - * @type {ol.Color|ol.ColorLike} + * @type {ol.Color|module:ol/colorlike~ColorLike} */ this.color_ = options.color !== undefined ? options.color : null; @@ -89,7 +89,7 @@ Stroke.prototype.clone = function() { /** * Get the stroke color. - * @return {ol.Color|ol.ColorLike} Color. + * @return {ol.Color|module:ol/colorlike~ColorLike} Color. * @api */ Stroke.prototype.getColor = function() { @@ -160,7 +160,7 @@ Stroke.prototype.getWidth = function() { /** * Set the color. * - * @param {ol.Color|ol.ColorLike} color Color. + * @param {ol.Color|module:ol/colorlike~ColorLike} color Color. * @api */ Stroke.prototype.setColor = function(color) { diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index 33f3a19b44..ad1fa4e681 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -70,7 +70,7 @@ ol.Attribution; /** - * @typedef {{fillStyle: ol.ColorLike}} + * @typedef {{fillStyle: module:ol/colorlike~ColorLike}} */ ol.CanvasFillState; @@ -91,8 +91,8 @@ ol.CanvasFunctionType; /** - * @typedef {{currentFillStyle: (ol.ColorLike|undefined), - * currentStrokeStyle: (ol.ColorLike|undefined), + * @typedef {{currentFillStyle: (module:ol/colorlike~ColorLike|undefined), + * currentStrokeStyle: (module:ol/colorlike~ColorLike|undefined), * currentLineCap: (string|undefined), * currentLineDash: Array., * currentLineDashOffset: (number|undefined), @@ -100,8 +100,8 @@ ol.CanvasFunctionType; * currentLineWidth: (number|undefined), * currentMiterLimit: (number|undefined), * lastStroke: (number|undefined), - * fillStyle: (ol.ColorLike|undefined), - * strokeStyle: (ol.ColorLike|undefined), + * fillStyle: (module:ol/colorlike~ColorLike|undefined), + * strokeStyle: (module:ol/colorlike~ColorLike|undefined), * lineCap: (string|undefined), * lineDash: Array., * lineDashOffset: (number|undefined), @@ -119,7 +119,7 @@ ol.CanvasFillStrokeState; * lineJoin: string, * lineWidth: number, * miterLimit: number, - * strokeStyle: ol.ColorLike}} + * strokeStyle: module:ol/colorlike~ColorLike}} */ 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.}} */ ol.CircleRenderOptions; @@ -223,7 +223,7 @@ ol.RasterOperation; /** * @typedef {{ - * strokeStyle: (ol.ColorLike|undefined), + * strokeStyle: (module:ol/colorlike~ColorLike|undefined), * strokeWidth: number, * size: number, * lineCap: string, From 3edbbf0b46e021c4490413e1a883d255fe1a529e Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 09:25:45 +0100 Subject: [PATCH 05/11] Module type for ol.Color --- src/ol/format/KML.js | 12 ++++++------ src/ol/render/canvas.js | 4 ++-- src/ol/render/webgl.js | 4 ++-- src/ol/style/Fill.js | 6 +++--- src/ol/style/Icon.js | 4 ++-- src/ol/style/IconImage.js | 6 +++--- src/ol/style/IconImageCache.js | 6 +++--- src/ol/style/Stroke.js | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 7fcb67a52a..1c0ec01e18 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -35,7 +35,7 @@ import {createElementNS, getAllTextContent, isDocument, isNode, makeArrayExtende /** - * @type {ol.Color} + * @type {module:ol/color~Color} */ let DEFAULT_COLOR; @@ -477,7 +477,7 @@ function findStyle(styleValue, defaultStyle, sharedStyles) { /** * @param {Node} node Node. - * @return {ol.Color|undefined} Color. + * @return {module:ol/color~Color|undefined} Color. */ function readColor(node) { const s = getAllTextContent(node, false); @@ -746,7 +746,7 @@ function labelStyleParser(node, objectStack) { const styleObject = objectStack[objectStack.length - 1]; const textStyle = new Text({ fill: new Fill({ - color: /** @type {ol.Color} */ + color: /** @type {module:ol/color~Color} */ ('color' in object ? object['color'] : DEFAULT_COLOR) }), scale: /** @type {number|undefined} */ @@ -784,7 +784,7 @@ function lineStyleParser(node, objectStack) { } const styleObject = objectStack[objectStack.length - 1]; const strokeStyle = new Stroke({ - color: /** @type {ol.Color} */ + color: /** @type {module:ol/color~Color} */ ('color' in object ? object['color'] : DEFAULT_COLOR), width: /** @type {number} */ ('width' in object ? object['width'] : 1) }); @@ -817,7 +817,7 @@ function polyStyleParser(node, objectStack) { } const styleObject = objectStack[objectStack.length - 1]; const fillStyle = new Fill({ - color: /** @type {ol.Color} */ + color: /** @type {module:ol/color~Color} */ ('color' in object ? object['color'] : DEFAULT_COLOR) }); styleObject['fillStyle'] = fillStyle; @@ -2067,7 +2067,7 @@ KML.prototype.readProjection; /** * @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) { const rgba = asArray(color); diff --git a/src/ol/render/canvas.js b/src/ol/render/canvas.js index 4d4debb055..8f3953ed48 100644 --- a/src/ol/render/canvas.js +++ b/src/ol/render/canvas.js @@ -17,7 +17,7 @@ export const defaultFont = '10px sans-serif'; /** * @const - * @type {ol.Color} + * @type {module:ol/color~Color} */ export const defaultFillStyle = [0, 0, 0, 1]; @@ -59,7 +59,7 @@ export const defaultMiterLimit = 10; /** * @const - * @type {ol.Color} + * @type {module:ol/color~Color} */ export const defaultStrokeStyle = [0, 0, 0, 1]; diff --git a/src/ol/render/webgl.js b/src/ol/render/webgl.js index dcfbb1c019..b1d0079f96 100644 --- a/src/ol/render/webgl.js +++ b/src/ol/render/webgl.js @@ -12,7 +12,7 @@ export const DEFAULT_FONT = '10px sans-serif'; /** * @const - * @type {ol.Color} + * @type {module:ol/color~Color} */ export const DEFAULT_FILLSTYLE = [0.0, 0.0, 0.0, 1.0]; @@ -53,7 +53,7 @@ export const DEFAULT_MITERLIMIT = 10; /** * @const - * @type {ol.Color} + * @type {module:ol/color~Color} */ export const DEFAULT_STROKESTYLE = [0.0, 0.0, 0.0, 1.0]; diff --git a/src/ol/style/Fill.js b/src/ol/style/Fill.js index b0ce0803f4..75575468ca 100644 --- a/src/ol/style/Fill.js +++ b/src/ol/style/Fill.js @@ -18,7 +18,7 @@ const Fill = function(opt_options) { /** * @private - * @type {ol.Color|module:ol/colorlike~ColorLike} + * @type {module:ol/color~Color|module:ol/colorlike~ColorLike} */ this.color_ = options.color !== undefined ? options.color : null; @@ -45,7 +45,7 @@ Fill.prototype.clone = function() { /** * Get the fill color. - * @return {ol.Color|module:ol/colorlike~ColorLike} Color. + * @return {module:ol/color~Color|module:ol/colorlike~ColorLike} Color. * @api */ Fill.prototype.getColor = function() { @@ -56,7 +56,7 @@ Fill.prototype.getColor = function() { /** * Set the color. * - * @param {ol.Color|module:ol/colorlike~ColorLike} color Color. + * @param {module:ol/color~Color|module:ol/colorlike~ColorLike} color Color. * @api */ Fill.prototype.setColor = function(color) { diff --git a/src/ol/style/Icon.js b/src/ol/style/Icon.js index 2e62683fa6..cf50dc752a 100644 --- a/src/ol/style/Icon.js +++ b/src/ol/style/Icon.js @@ -99,7 +99,7 @@ const Icon = function(opt_options) { /** * @private - * @type {ol.Color} + * @type {module:ol/color~Color} */ this.color_ = options.color !== undefined ? asArray(options.color) : null; @@ -248,7 +248,7 @@ Icon.prototype.getAnchor = function() { /** * Get the icon color. - * @return {ol.Color} Color. + * @return {module:ol/color~Color} Color. * @api */ Icon.prototype.getColor = function() { diff --git a/src/ol/style/IconImage.js b/src/ol/style/IconImage.js index d57390c33d..62fa462b86 100644 --- a/src/ol/style/IconImage.js +++ b/src/ol/style/IconImage.js @@ -16,7 +16,7 @@ import {iconImageCache} from '../style.js'; * @param {module:ol/size~Size} size Size. * @param {?string} crossOrigin Cross origin. * @param {ol.ImageState} imageState Image state. - * @param {ol.Color} color Color. + * @param {module:ol/color~Color} color Color. * @extends {module:ol/events/EventTarget~EventTarget} */ const IconImage = function(image, src, size, crossOrigin, imageState, color) { @@ -49,7 +49,7 @@ const IconImage = function(image, src, size, crossOrigin, imageState, color) { /** * @private - * @type {ol.Color} + * @type {module:ol/color~Color} */ this.color_ = color; @@ -97,7 +97,7 @@ inherits(IconImage, EventTarget); * @param {module:ol/size~Size} size Size. * @param {?string} crossOrigin Cross origin. * @param {ol.ImageState} imageState Image state. - * @param {ol.Color} color Color. + * @param {module:ol/color~Color} color Color. * @return {ol.style.IconImage} Icon image. */ export function get(image, src, size, crossOrigin, imageState, color) { diff --git a/src/ol/style/IconImageCache.js b/src/ol/style/IconImageCache.js index c0d65d4b7e..6b124739f1 100644 --- a/src/ol/style/IconImageCache.js +++ b/src/ol/style/IconImageCache.js @@ -32,7 +32,7 @@ const IconImageCache = function() { /** * @param {string} src Src. * @param {?string} crossOrigin Cross origin. - * @param {ol.Color} color Color. + * @param {module:ol/color~Color} color Color. * @return {string} Cache key. */ function getKey(src, crossOrigin, color) { @@ -70,7 +70,7 @@ IconImageCache.prototype.expire = function() { /** * @param {string} src Src. * @param {?string} crossOrigin Cross origin. - * @param {ol.Color} color Color. + * @param {module:ol/color~Color} color Color. * @return {ol.style.IconImage} Icon image. */ IconImageCache.prototype.get = function(src, crossOrigin, color) { @@ -82,7 +82,7 @@ IconImageCache.prototype.get = function(src, crossOrigin, color) { /** * @param {string} src Src. * @param {?string} crossOrigin Cross origin. - * @param {ol.Color} color Color. + * @param {module:ol/color~Color} color Color. * @param {ol.style.IconImage} iconImage Icon image. */ IconImageCache.prototype.set = function(src, crossOrigin, color, iconImage) { diff --git a/src/ol/style/Stroke.js b/src/ol/style/Stroke.js index 63ab1ce76b..cdfd960d8f 100644 --- a/src/ol/style/Stroke.js +++ b/src/ol/style/Stroke.js @@ -20,7 +20,7 @@ const Stroke = function(opt_options) { /** * @private - * @type {ol.Color|module:ol/colorlike~ColorLike} + * @type {module:ol/color~Color|module:ol/colorlike~ColorLike} */ this.color_ = options.color !== undefined ? options.color : null; @@ -89,7 +89,7 @@ Stroke.prototype.clone = function() { /** * Get the stroke color. - * @return {ol.Color|module:ol/colorlike~ColorLike} Color. + * @return {module:ol/color~Color|module:ol/colorlike~ColorLike} Color. * @api */ Stroke.prototype.getColor = function() { @@ -160,7 +160,7 @@ Stroke.prototype.getWidth = function() { /** * Set the color. * - * @param {ol.Color|module:ol/colorlike~ColorLike} color Color. + * @param {module:ol/color~Color|module:ol/colorlike~ColorLike} color Color. * @api */ Stroke.prototype.setColor = function(color) { From ded99ccad70c43a1670a7ff72f1fa818787db85d Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 09:31:18 +0100 Subject: [PATCH 06/11] Module type for ol.ImageState --- src/ol/style/Icon.js | 2 +- src/ol/style/IconImage.js | 8 ++++---- src/ol/style/Image.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ol/style/Icon.js b/src/ol/style/Icon.js index cf50dc752a..cc6cfb3204 100644 --- a/src/ol/style/Icon.js +++ b/src/ol/style/Icon.js @@ -92,7 +92,7 @@ const Icon = function(opt_options) { 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 ? ImageState.IDLE : ImageState.LOADED; diff --git a/src/ol/style/IconImage.js b/src/ol/style/IconImage.js index 62fa462b86..556eeadc5e 100644 --- a/src/ol/style/IconImage.js +++ b/src/ol/style/IconImage.js @@ -15,7 +15,7 @@ import {iconImageCache} from '../style.js'; * @param {string|undefined} src Src. * @param {module:ol/size~Size} size Size. * @param {?string} crossOrigin Cross origin. - * @param {ol.ImageState} imageState Image state. + * @param {module:ol/ImageState~ImageState} imageState Image state. * @param {module:ol/color~Color} color Color. * @extends {module:ol/events/EventTarget~EventTarget} */ @@ -61,7 +61,7 @@ const IconImage = function(image, src, size, crossOrigin, imageState, color) { /** * @private - * @type {ol.ImageState} + * @type {module:ol/ImageState~ImageState} */ this.imageState_ = imageState; @@ -96,7 +96,7 @@ inherits(IconImage, EventTarget); * @param {string} src Src. * @param {module:ol/size~Size} size Size. * @param {?string} crossOrigin Cross origin. - * @param {ol.ImageState} imageState Image state. + * @param {module:ol/ImageState~ImageState} imageState Image state. * @param {module:ol/color~Color} color Color. * @return {ol.style.IconImage} Icon image. */ @@ -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() { return this.imageState_; diff --git a/src/ol/style/Image.js b/src/ol/style/Image.js index 073cc3b032..aa64a9f50b 100644 --- a/src/ol/style/Image.js +++ b/src/ol/style/Image.js @@ -125,7 +125,7 @@ ImageStyle.prototype.getHitDetectionImage = function(pixelRatio) {}; /** * @abstract - * @return {ol.ImageState} Image state. + * @return {module:ol/ImageState~ImageState} Image state. */ ImageStyle.prototype.getImageState = function() {}; From c4b38ed5dc30fc11ce265288072d74587a800911 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 09:34:19 +0100 Subject: [PATCH 07/11] Module type for ol.TileState --- src/ol/source/TileImage.js | 2 +- src/ol/source/TileUTFGrid.js | 2 +- src/ol/source/VectorTile.js | 2 +- src/ol/source/Zoomify.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index 1effc41805..0ebcea0e48 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -53,7 +53,7 @@ const TileImage = function(options) { /** * @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=)} */ this.tileClass = options.tileClass !== undefined ? diff --git a/src/ol/source/TileUTFGrid.js b/src/ol/source/TileUTFGrid.js index 9c6559731c..f8f227fdae 100644 --- a/src/ol/source/TileUTFGrid.js +++ b/src/ol/source/TileUTFGrid.js @@ -21,7 +21,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; * @constructor * @extends {ol.Tile} * @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 {module:ol/extent~Extent} extent Extent of the tile. * @param {boolean} preemptive Load the tile when visible (before it's needed). diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index c05d75d650..b271024d40 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -74,7 +74,7 @@ const VectorTileSource = function(options) { /** * @protected - * @type {function(new: ol.VectorTile, module:ol/tilecoord~TileCoord, ol.TileState, string, + * @type {function(new: ol.VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string, * ol.format.Feature, module:ol/Tile~LoadFunction)} */ this.tileClass = options.tileClass ? options.tileClass : VectorTile; diff --git a/src/ol/source/Zoomify.js b/src/ol/source/Zoomify.js index 03df363f61..b2c1d2c391 100644 --- a/src/ol/source/Zoomify.js +++ b/src/ol/source/Zoomify.js @@ -28,7 +28,7 @@ const TierSizeCalculation = { * @extends {ol.ImageTile} * @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid TileGrid that the tile belongs to. * @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} crossOrigin Cross origin. * @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function. From 5b349147b5108ed50f17556fe423807abca7cb8a Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 09:36:58 +0100 Subject: [PATCH 08/11] Module type for ol.VectorTile --- src/ol/renderer/canvas/VectorTileLayer.js | 2 +- src/ol/source/VectorTile.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ol/renderer/canvas/VectorTileLayer.js b/src/ol/renderer/canvas/VectorTileLayer.js index a09e5626f4..3d641abbee 100644 --- a/src/ol/renderer/canvas/VectorTileLayer.js +++ b/src/ol/renderer/canvas/VectorTileLayer.js @@ -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. * @return {module:ol/transform~Transform} transform Transform. * @private diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index b271024d40..8196490add 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -62,7 +62,7 @@ const VectorTileSource = function(options) { /** * @private - * @type {Object.} + * @type {Object.} */ this.sourceTiles_ = {}; @@ -74,7 +74,7 @@ const VectorTileSource = function(options) { /** * @protected - * @type {function(new: ol.VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~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)} */ this.tileClass = options.tileClass ? options.tileClass : VectorTile; From ae3dc8ea06a6bcada367a639b1dc0ab15b6a0474 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 09:41:22 +0100 Subject: [PATCH 09/11] Module type for ol.VectorImageTile --- src/ol/renderer/canvas/VectorTileLayer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ol/renderer/canvas/VectorTileLayer.js b/src/ol/renderer/canvas/VectorTileLayer.js index 3d641abbee..4336b02b02 100644 --- a/src/ol/renderer/canvas/VectorTileLayer.js +++ b/src/ol/renderer/canvas/VectorTileLayer.js @@ -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. * @private */ @@ -248,7 +248,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram */ CanvasVectorTileLayerRenderer.prototype.drawTileImage = function( 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); if (this.context) { this.renderTileImage_(vectorImageTile, frameState, layerState); @@ -268,7 +268,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co /** @type {!Object.} */ const features = {}; - /** @type {Array.} */ + /** @type {Array.} */ const renderedTiles = this.renderedTiles; const source = /** @type {ol.source.VectorTile} */ (layer.getSource()); @@ -385,7 +385,7 @@ CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameSta const clips = []; const zs = []; 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) { 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/layer/Layer~State} layerState Layer state. * @private From 00f75f692f6062f910e02f82fb88971945d7165b Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 09:44:55 +0100 Subject: [PATCH 10/11] Fix typo in jsdoc type --- src/ol/renderer/Map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/renderer/Map.js b/src/ol/renderer/Map.js index ec1b3d2f45..6654c75a1e 100644 --- a/src/ol/renderer/Map.js +++ b/src/ol/renderer/Map.js @@ -15,7 +15,7 @@ import {compose as composeTransform, invert as invertTransform, setFromArray as /** * @constructor * @abstract - * @extends {module:ol/Disposable~Disposabl} + * @extends {module:ol/Disposable~Disposable} * @param {Element} container Container. * @param {module:ol/PluggableMap~PluggableMap} map Map. * @struct From bbfaa333c08b642c2b85cb0c430dc78f0439e434 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 19 Mar 2018 09:56:14 +0100 Subject: [PATCH 11/11] Fix class name in jsdoc type annotation --- src/ol/interaction/Pointer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ol/interaction/Pointer.js b/src/ol/interaction/Pointer.js index ab0c161bb1..81249781bb 100644 --- a/src/ol/interaction/Pointer.js +++ b/src/ol/interaction/Pointer.js @@ -11,7 +11,7 @@ import {getValues} from '../obj.js'; /** * @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event. - * @this {module:ol/interaction/Pointer~Pointer} + * @this {module:ol/interaction/Pointer~PointerInteraction} */ const handleDragEvent = UNDEFINED; @@ -19,7 +19,7 @@ const handleDragEvent = UNDEFINED; /** * @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event. * @return {boolean} Capture dragging. - * @this {module:ol/interaction/Pointer~Pointer} + * @this {module:ol/interaction/Pointer~PointerInteraction} */ const handleUpEvent = FALSE; @@ -27,14 +27,14 @@ const handleUpEvent = FALSE; /** * @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event. * @return {boolean} Capture dragging. - * @this {module:ol/interaction/Pointer~Pointer} + * @this {module:ol/interaction/Pointer~PointerInteraction} */ const handleDownEvent = FALSE; /** * @param {module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent} mapBrowserEvent Event. - * @this {module:ol/interaction/Pointer~Pointer} + * @this {module:ol/interaction/Pointer~PointerInteraction} */ const handleMoveEvent = UNDEFINED; @@ -194,7 +194,7 @@ PointerInteraction.prototype.updateTrackedPointers_ = function(mapBrowserEvent) * detected. * @param {module:ol/MapBrowserEvent~MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} `false` to stop event propagation. - * @this {module:ol/interaction/Pointer~Pointer} + * @this {module:ol/interaction/Pointer~PointerInteraction} * @api */ export function handleEvent(mapBrowserEvent) {