Move olx.style.TextOptions to ol/style/Text
This commit is contained in:
174
externs/olx.js
174
externs/olx.js
@@ -49,180 +49,6 @@ olx.render.State.prototype.resolution;
|
||||
olx.render.State.prototype.rotation;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{font: (string|undefined),
|
||||
* maxAngle: (number|undefined),
|
||||
* offsetX: (number|undefined),
|
||||
* offsetY: (number|undefined),
|
||||
* overflow: (boolean|undefined),
|
||||
* placement: (module:ol/style/Text~TextPlacement|string|undefined),
|
||||
* scale: (number|undefined),
|
||||
* rotateWithView: (boolean|undefined),
|
||||
* rotation: (number|undefined),
|
||||
* text: (string|undefined),
|
||||
* textAlign: (string|undefined),
|
||||
* textBaseline: (string|undefined),
|
||||
* fill: (module:ol/style/Fill~Fill|undefined),
|
||||
* stroke: (module:ol/style/Stroke~Stroke|undefined),
|
||||
* backgroundFill: (module:ol/style/Fill~Fill|undefined),
|
||||
* backgroundStroke: (module:ol/style/Stroke~Stroke|undefined),
|
||||
* padding: (Array.<number>|undefined)}}
|
||||
*/
|
||||
olx.style.TextOptions;
|
||||
|
||||
|
||||
/**
|
||||
* Font style as CSS 'font' value, see:
|
||||
* {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font}.
|
||||
* Default is '10px sans-serif'
|
||||
* @type {string|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.font;
|
||||
|
||||
|
||||
/**
|
||||
* When `placement` is set to `'line'`, allow a maximum angle between adjacent
|
||||
* characters. The expected value is in radians, and the default is 45°
|
||||
* (`Math.PI / 4`).
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.maxAngle;
|
||||
|
||||
|
||||
/**
|
||||
* Horizontal text offset in pixels. A positive will shift the text right.
|
||||
* Default is `0`.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.offsetX;
|
||||
|
||||
|
||||
/**
|
||||
* Vertical text offset in pixels. A positive will shift the text down. Default
|
||||
* is `0`.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.offsetY;
|
||||
|
||||
|
||||
/**
|
||||
* For polygon labels or when `placement` is set to `'line'`, allow text to
|
||||
* exceed the width of the polygon at the label position or the length of
|
||||
* the path that it follows. Default is `false`.
|
||||
* @type {boolean|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.overflow;
|
||||
|
||||
|
||||
/**
|
||||
* Text placement.
|
||||
* @type {module:ol/style/Text~TextPlacement|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.placement;
|
||||
|
||||
|
||||
/**
|
||||
* Scale.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.scale;
|
||||
|
||||
|
||||
/**
|
||||
* Whether to rotate the text with the view. Default is `false`.
|
||||
* @type {boolean|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.rotateWithView;
|
||||
|
||||
|
||||
/**
|
||||
* Rotation in radians (positive rotation clockwise). Default is `0`.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.rotation;
|
||||
|
||||
|
||||
/**
|
||||
* Text content.
|
||||
* @type {string|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.text;
|
||||
|
||||
|
||||
/**
|
||||
* Text alignment. Possible values: 'left', 'right', 'center', 'end' or 'start'.
|
||||
* Default is 'center' for `placement: 'point'`. For `placement: 'line'`, the
|
||||
* default is to let the renderer choose a placement where `maxAngle` is not
|
||||
* exceeded.
|
||||
* @type {string|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.textAlign;
|
||||
|
||||
|
||||
/**
|
||||
* Text base line. Possible values: 'bottom', 'top', 'middle', 'alphabetic',
|
||||
* 'hanging', 'ideographic'. Default is 'middle'.
|
||||
* @type {string|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.textBaseline;
|
||||
|
||||
|
||||
/**
|
||||
* Fill style. If none is provided, we'll use a dark fill-style (#333).
|
||||
* @type {module:ol/style/Fill~Fill|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.fill;
|
||||
|
||||
|
||||
/**
|
||||
* Stroke style.
|
||||
* @type {module:ol/style/Stroke~Stroke|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.stroke;
|
||||
|
||||
|
||||
/**
|
||||
* Fill style for the text background when `placement` is `'point'`. Default is
|
||||
* no fill.
|
||||
* @type {module:ol/style/Fill~Fill|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.backgroundFill;
|
||||
|
||||
|
||||
/**
|
||||
* Stroke style for the text background when `placement` is `'point'`. Default
|
||||
* is no stroke.
|
||||
* @type {module:ol/style/Stroke~Stroke|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.backgroundStroke;
|
||||
|
||||
|
||||
/**
|
||||
* Padding in pixels around the text for decluttering and background. The order
|
||||
* of values in the array is `[top, right, bottom, left]`. Default is
|
||||
* `[0, 0, 0, 0]`.
|
||||
* @type {Array.<number>|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.style.TextOptions.prototype.padding;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{geometry: (undefined|string|module:ol/geom/Geometry~Geometry|ol.StyleGeometryFunction),
|
||||
* fill: (module:ol/style/Fill~Fill|undefined),
|
||||
|
||||
Reference in New Issue
Block a user