Add placement, maxAngle and exceedLength options to ol.style.Text

This commit is contained in:
Andreas Hocevar
2017-09-07 23:20:27 +02:00
parent b03bb2c2ce
commit 37dcd79a86
3 changed files with 129 additions and 0 deletions

View File

@@ -7658,8 +7658,11 @@ olx.style.StrokeOptions.prototype.width;
/**
* @typedef {{font: (string|undefined),
* exceedLength: (boolean|undefined),
* maxAngle: (number|undefined),
* offsetX: (number|undefined),
* offsetY: (number|undefined),
* placement: (ol.style.TextPlacement|string|undefined),
* scale: (number|undefined),
* rotateWithView: (boolean|undefined),
* rotation: (number|undefined),
@@ -7672,6 +7675,15 @@ olx.style.StrokeOptions.prototype.width;
olx.style.TextOptions;
/**
* When `placement` is set to `'line'`, allow text to exceed the length of the
* path that it follows. Default is `false`.
* @type {boolean|undefined}
* @api
*/
olx.style.TextOptions.prototype.exceedLength;
/**
* Font style as CSS 'font' value, see:
* {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font}.
@@ -7682,6 +7694,16 @@ olx.style.TextOptions;
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`.
@@ -7700,6 +7722,14 @@ olx.style.TextOptions.prototype.offsetX;
olx.style.TextOptions.prototype.offsetY;
/**
* Text placement.
* @type {ol.style.TextPlacement|undefined}
* @api
*/
olx.style.TextOptions.prototype.placement;
/**
* Scale.
* @type {number|undefined}