Replace TextPlacement enum with typedef

This commit is contained in:
Maximilian Krög
2022-07-16 23:30:07 +02:00
parent 4d2156ff3a
commit 69caa06783
4 changed files with 15 additions and 24 deletions

View File

@@ -61,7 +61,7 @@ import {getFontParameters} from '../css.js';
* @property {string} [textAlign] TextAlign.
* @property {string} [justify] Justify.
* @property {string} textBaseline TextBaseline.
* @property {string} [placement] Placement.
* @property {import('../style/Text.js').TextPlacement} [placement] Placement.
* @property {number} [maxAngle] MaxAngle.
* @property {boolean} [overflow] Overflow.
* @property {import("../style/Fill.js").default} [backgroundFill] BackgroundFill.

View File

@@ -3,7 +3,6 @@
*/
import CanvasBuilder from './Builder.js';
import CanvasInstruction from './Instruction.js';
import TextPlacement from '../../style/TextPlacement.js';
import {asColorLike} from '../../colorlike.js';
import {
defaultFillStyle,
@@ -177,7 +176,7 @@ class CanvasTextBuilder extends CanvasBuilder {
let stride = geometry.getStride();
if (
textState.placement === TextPlacement.LINE &&
textState.placement === 'line' &&
(geometryType == 'LineString' ||
geometryType == 'MultiLineString' ||
geometryType == 'Polygon' ||