From 55932440b19aa4c1145fad78f0be16a07e1b7f96 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 12 Nov 2024 14:02:29 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9D=BC=EC=9D=B8=20attribute=20=EC=97=AC?= =?UTF-8?q?=EB=B6=80=20=ED=99=95=EC=9D=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/fabric/QPolygon.js | 6 +++--- src/hooks/useCanvas.js | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index ce4d93c7..64ec1125 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -167,9 +167,9 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { }, initLines() { - if (this.lines.length > 0) { - return - } + // if (this.lines.length > 0) { + // return + // } this.lines = [] diff --git a/src/hooks/useCanvas.js b/src/hooks/useCanvas.js index c1bc760f..46dbbb35 100644 --- a/src/hooks/useCanvas.js +++ b/src/hooks/useCanvas.js @@ -118,10 +118,12 @@ export function useCanvas(id) { //QLine에 커스텀 어트리뷰트 넣기 if (this.type === 'QLine') { - this.attributes.type = this.attributes.type || 'default' - source.attributes = { - ...this.attributes, - type: this.attributes.type, + if (this.attributes) { + this.attributes.type = this.attributes.type || 'default' + source.attributes = { + ...this.attributes, + type: this.attributes.type, + } } }