From 056568c936bba137b28dc05b6fbda6f49405105f Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 12 Dec 2018 14:47:46 +0100 Subject: [PATCH] Remove type cast in ol/render/canvas/TextBuilder --- src/ol/render/canvas/TextBuilder.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ol/render/canvas/TextBuilder.js b/src/ol/render/canvas/TextBuilder.js index d6a06c23a6..e5850def1e 100644 --- a/src/ol/render/canvas/TextBuilder.js +++ b/src/ol/render/canvas/TextBuilder.js @@ -308,7 +308,7 @@ class CanvasTextBuilder extends CanvasBuilder { const strokeKey = this.strokeKey_; if (strokeState) { if (!(strokeKey in this.strokeStates)) { - this.strokeStates[strokeKey] = /** @type {import("../canvas.js").StrokeState} */ ({ + this.strokeStates[strokeKey] = { strokeStyle: strokeState.strokeStyle, lineCap: strokeState.lineCap, lineDashOffset: strokeState.lineDashOffset, @@ -316,24 +316,24 @@ class CanvasTextBuilder extends CanvasBuilder { lineJoin: strokeState.lineJoin, miterLimit: strokeState.miterLimit, lineDash: strokeState.lineDash - }); + }; } } const textKey = this.textKey_; if (!(textKey in this.textStates)) { - this.textStates[textKey] = /** @type {import("../canvas.js").TextState} */ ({ + this.textStates[textKey] = { font: textState.font, textAlign: textState.textAlign || defaultTextAlign, textBaseline: textState.textBaseline || defaultTextBaseline, scale: textState.scale - }); + }; } const fillKey = this.fillKey_; if (fillState) { if (!(fillKey in this.fillStates)) { - this.fillStates[fillKey] = /** @type {import("../canvas.js").FillState} */ ({ + this.fillStates[fillKey] = { fillStyle: fillState.fillStyle - }); + }; } } }