Replace TextPlacement enum with typedef
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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' ||
|
||||
|
||||
Reference in New Issue
Block a user