diff --git a/src/ol/render/canvas.js b/src/ol/render/canvas.js index 8f3953ed48..2e34e42b42 100644 --- a/src/ol/render/canvas.js +++ b/src/ol/render/canvas.js @@ -8,6 +8,11 @@ import LRUCache from '../structs/LRUCache.js'; import {create as createTransform} from '../transform.js'; +/** + * @typedef {{fillStyle: module:ol/colorlike~ColorLike}} FillState + */ + + /** * @const * @type {string} diff --git a/src/ol/render/canvas/Immediate.js b/src/ol/render/canvas/Immediate.js index 1f4117832d..28f7101b1c 100644 --- a/src/ol/render/canvas/Immediate.js +++ b/src/ol/render/canvas/Immediate.js @@ -70,7 +70,7 @@ const CanvasImmediateRenderer = function(context, pixelRatio, extent, transform, /** * @private - * @type {?ol.CanvasFillState} + * @type {?module:ol/render/canvas~FillState} */ this.contextFillState_ = null; @@ -88,7 +88,7 @@ const CanvasImmediateRenderer = function(context, pixelRatio, extent, transform, /** * @private - * @type {?ol.CanvasFillState} + * @type {?module:ol/render/canvas~FillState} */ this.fillState_ = null; @@ -208,7 +208,7 @@ const CanvasImmediateRenderer = function(context, pixelRatio, extent, transform, /** * @private - * @type {?ol.CanvasFillState} + * @type {?module:ol/render/canvas~FillState} */ this.textFillState_ = null; @@ -698,7 +698,7 @@ CanvasImmediateRenderer.prototype.drawMultiPolygon = function(geometry) { /** - * @param {ol.CanvasFillState} fillState Fill state. + * @param {module:ol/render/canvas~FillState} fillState Fill state. * @private */ CanvasImmediateRenderer.prototype.setContextFillState_ = function(fillState) { diff --git a/src/ol/render/canvas/TextReplay.js b/src/ol/render/canvas/TextReplay.js index 3b8bbac118..0ed5dc1ff6 100644 --- a/src/ol/render/canvas/TextReplay.js +++ b/src/ol/render/canvas/TextReplay.js @@ -74,12 +74,12 @@ const CanvasTextReplay = function( /** * @private - * @type {?ol.CanvasFillState} + * @type {?module:ol/render/canvas~FillState} */ this.textFillState_ = null; /** - * @type {!Object.} + * @type {!Object.} */ this.fillStates = {}; @@ -413,7 +413,7 @@ CanvasTextReplay.prototype.drawChars_ = function(begin, end, declutterGroup) { const fillKey = this.fillKey_; if (fillState) { if (!(fillKey in this.fillStates)) { - this.fillStates[fillKey] = /** @type {ol.CanvasFillState} */ ({ + this.fillStates[fillKey] = /** @type {module:ol/render/canvas~FillState} */ ({ fillStyle: fillState.fillStyle }); } @@ -474,7 +474,7 @@ CanvasTextReplay.prototype.setTextStyle = function(textStyle, declutterGroup) { } else { fillState = this.textFillState_; if (!fillState) { - fillState = this.textFillState_ = /** @type {ol.CanvasFillState} */ ({}); + fillState = this.textFillState_ = /** @type {module:ol/render/canvas~FillState} */ ({}); } fillState.fillStyle = asColorLike( textFillStyle.getColor() || defaultFillStyle); diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index eabae97392..2a848f456d 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -21,12 +21,6 @@ const ol = {}; */ -/** - * @typedef {{fillStyle: module:ol/colorlike~ColorLike}} - */ -ol.CanvasFillState; - - /** * A function returning the canvas element (`{HTMLCanvasElement}`) * used by the source as an image. The arguments passed to the function are: