Move olx.style.StrokeOptions to src/ol/style/Stroke

This commit is contained in:
Frederic Junod
2018-03-27 15:51:49 +02:00
parent ac1a9e97ed
commit 5bfa3ebcda
2 changed files with 18 additions and 77 deletions

View File

@@ -2952,82 +2952,6 @@ olx.style.RegularShapeOptions.prototype.rotateWithView;
olx.style.RegularShapeOptions.prototype.atlasManager;
/**
* @typedef {{color: (ol.Color|ol.ColorLike|undefined),
* lineCap: (string|undefined),
* lineJoin: (string|undefined),
* lineDash: (Array.<number>|undefined),
* lineDashOffset: (number|undefined),
* miterLimit: (number|undefined),
* width: (number|undefined)}}
*/
olx.style.StrokeOptions;
/**
* A color, gradient or pattern. See {@link ol.color}
* and {@link ol.colorlike} for possible formats. Default null;
* if null, the Canvas/renderer default black will be used.
* @type {ol.Color|ol.ColorLike|undefined}
* @api
*/
olx.style.StrokeOptions.prototype.color;
/**
* Line cap style: `butt`, `round`, or `square`. Default is `round`.
* @type {string|undefined}
* @api
*/
olx.style.StrokeOptions.prototype.lineCap;
/**
* Line join style: `bevel`, `round`, or `miter`. Default is `round`.
* @type {string|undefined}
* @api
*/
olx.style.StrokeOptions.prototype.lineJoin;
/**
* Line dash pattern. Default is `undefined` (no dash). Please note that
* Internet Explorer 10 and lower [do not support][mdn] the `setLineDash`
* method on the `CanvasRenderingContext2D` and therefore this option will
* have no visual effect in these browsers.
*
* [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility
*
* @type {Array.<number>|undefined}
* @api
*/
olx.style.StrokeOptions.prototype.lineDash;
/**
* Line dash offset. Default is '0'.
* @type {number|undefined}
* @api
*/
olx.style.StrokeOptions.prototype.lineDashOffset;
/**
* Miter limit. Default is `10`.
* @type {number|undefined}
* @api
*/
olx.style.StrokeOptions.prototype.miterLimit;
/**
* Width.
* @type {number|undefined}
* @api
*/
olx.style.StrokeOptions.prototype.width;
/**
* @typedef {{font: (string|undefined),
* maxAngle: (number|undefined),

View File

@@ -3,6 +3,23 @@
*/
import {getUid} from '../index.js';
/**
* @typedef {Object} Options
* @property {module:ol/color~Color|module:ol/colorlike~ColorLike} [color] A color, gradient or pattern.
* See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.
* Default null; if null, the Canvas/renderer default black will be used.
* @property {string} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.
* @property {string} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.
* @property {Array.<number>} [lineDash] Line dash pattern. Default is `undefined` (no dash).
* Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on
* the `CanvasRenderingContext2D` and therefore this option will have no visual effect in these browsers.
* @property {number} [lineDashOffset=0] Line dash offset.
* @property {number} [miterLimit=10] Miter limit.
* @property {number} [width] Width.
*/
/**
* @classdesc
* Set stroke style for vector features.
@@ -11,7 +28,7 @@ import {getUid} from '../index.js';
* the options; they will not return the default.
*
* @constructor
* @param {olx.style.StrokeOptions=} opt_options Options.
* @param {module:ol/style/Stroke~Options=} opt_options Options.
* @api
*/
const Stroke = function(opt_options) {