diff --git a/src/ol/style/RegularShape.js b/src/ol/style/RegularShape.js index f15784f29c..b84510b24a 100644 --- a/src/ol/style/RegularShape.js +++ b/src/ol/style/RegularShape.js @@ -33,6 +33,18 @@ import ImageStyle from '../style/Image.js'; */ +/** + * @typedef {Object} RenderOptions + * @property {module:ol/colorlike~ColorLike} [strokeStyle] + * @property {number} strokeWidth + * @property {number} size + * @property {string} lineCap + * @property {Array.} lineDash + * @property {string} lineJoin + * @property {number} miterLimit + */ + + /** * @classdesc * Set regular shape style for vector features. The resulting shape will be @@ -378,7 +390,7 @@ RegularShape.prototype.render_ = function(atlasManager) { let size = 2 * (this.radius_ + strokeWidth) + 1; - /** @type {ol.RegularShapeRenderOptions} */ + /** @type {module:ol/style/RegularShape~RenderOptions} */ const renderOptions = { strokeStyle: strokeStyle, strokeWidth: strokeWidth, @@ -441,7 +453,7 @@ RegularShape.prototype.render_ = function(atlasManager) { /** * @private - * @param {ol.RegularShapeRenderOptions} renderOptions Render options. + * @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options. * @param {CanvasRenderingContext2D} context The rendering context. * @param {number} x The origin for the symbol (x). * @param {number} y The origin for the symbol (y). @@ -502,7 +514,7 @@ RegularShape.prototype.draw_ = function(renderOptions, context, x, y) { /** * @private - * @param {ol.RegularShapeRenderOptions} renderOptions Render options. + * @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options. */ RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) { this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size]; @@ -522,7 +534,7 @@ RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) { /** * @private - * @param {ol.RegularShapeRenderOptions} renderOptions Render options. + * @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options. * @param {CanvasRenderingContext2D} context The context. * @param {number} x The origin for the symbol (x). * @param {number} y The origin for the symbol (y). diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index a4819b150a..91fc5c49ae 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -150,20 +150,6 @@ ol.LoadingStrategy; ol.RasterOperation; -/** - * @typedef {{ - * strokeStyle: (module:ol/colorlike~ColorLike|undefined), - * strokeWidth: number, - * size: number, - * lineCap: string, - * lineDash: Array., - * lineJoin: string, - * miterLimit: number - * }} - */ -ol.RegularShapeRenderOptions; - - /** * Number of features; bounds/extent. * @typedef {{numberOfFeatures: number,