Move ol.RegularShapeRenderOptions to ol/style/RegularShape
This commit is contained in:
committed by
Frederic Junod
parent
873c627cda
commit
76572b6ccf
@@ -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.<number>} lineDash
|
||||||
|
* @property {string} lineJoin
|
||||||
|
* @property {number} miterLimit
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Set regular shape style for vector features. The resulting shape will be
|
* 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;
|
let size = 2 * (this.radius_ + strokeWidth) + 1;
|
||||||
|
|
||||||
/** @type {ol.RegularShapeRenderOptions} */
|
/** @type {module:ol/style/RegularShape~RenderOptions} */
|
||||||
const renderOptions = {
|
const renderOptions = {
|
||||||
strokeStyle: strokeStyle,
|
strokeStyle: strokeStyle,
|
||||||
strokeWidth: strokeWidth,
|
strokeWidth: strokeWidth,
|
||||||
@@ -441,7 +453,7 @@ RegularShape.prototype.render_ = function(atlasManager) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.RegularShapeRenderOptions} renderOptions Render options.
|
* @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options.
|
||||||
* @param {CanvasRenderingContext2D} context The rendering context.
|
* @param {CanvasRenderingContext2D} context The rendering context.
|
||||||
* @param {number} x The origin for the symbol (x).
|
* @param {number} x The origin for the symbol (x).
|
||||||
* @param {number} y The origin for the symbol (y).
|
* @param {number} y The origin for the symbol (y).
|
||||||
@@ -502,7 +514,7 @@ RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.RegularShapeRenderOptions} renderOptions Render options.
|
* @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options.
|
||||||
*/
|
*/
|
||||||
RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
||||||
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
||||||
@@ -522,7 +534,7 @@ RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.RegularShapeRenderOptions} renderOptions Render options.
|
* @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options.
|
||||||
* @param {CanvasRenderingContext2D} context The context.
|
* @param {CanvasRenderingContext2D} context The context.
|
||||||
* @param {number} x The origin for the symbol (x).
|
* @param {number} x The origin for the symbol (x).
|
||||||
* @param {number} y The origin for the symbol (y).
|
* @param {number} y The origin for the symbol (y).
|
||||||
|
|||||||
@@ -150,20 +150,6 @@ ol.LoadingStrategy;
|
|||||||
ol.RasterOperation;
|
ol.RasterOperation;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{
|
|
||||||
* strokeStyle: (module:ol/colorlike~ColorLike|undefined),
|
|
||||||
* strokeWidth: number,
|
|
||||||
* size: number,
|
|
||||||
* lineCap: string,
|
|
||||||
* lineDash: Array.<number>,
|
|
||||||
* lineJoin: string,
|
|
||||||
* miterLimit: number
|
|
||||||
* }}
|
|
||||||
*/
|
|
||||||
ol.RegularShapeRenderOptions;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of features; bounds/extent.
|
* Number of features; bounds/extent.
|
||||||
* @typedef {{numberOfFeatures: number,
|
* @typedef {{numberOfFeatures: number,
|
||||||
|
|||||||
Reference in New Issue
Block a user