From 0ae09e17dd71a7a9b8c9a8375638217699bb3e9b Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Fri, 21 Feb 2025 17:09:46 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=80=EC=9E=A5=20=ED=9B=84=20=EB=B6=88?= =?UTF-8?q?=EB=9F=AC=EC=98=AC=20=EB=95=8C=20lines=20attributes=20=EC=84=B8?= =?UTF-8?q?=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/fabric/QPolygon.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index b0c46798..b8c3bbed 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -162,9 +162,10 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { }, initLines() { - // if (this.lines.length > 0) { - // return - // } + let attributes = null + if (this.lines.length > 0) { + attributes = this.lines.map((line) => line.attributes) + } this.lines = [] @@ -174,9 +175,11 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { stroke: this.stroke, strokeWidth: this.strokeWidth, fontSize: this.fontSize, - attributes: { - offset: 0, - }, + attributes: attributes + ? attributes[i] + : { + offset: 0, + }, textVisible: false, parent: this, parentId: this.id,