From edcb51e224b5f56d886b1fc3ca8796d3cde2deed Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 4 Mar 2025 14:59:39 +0900 Subject: [PATCH] =?UTF-8?q?#695=20=EC=A7=80=EB=B6=95=EC=9E=AC=20=ED=9D=90?= =?UTF-8?q?=EB=A6=84=20=ED=99=95=EC=9D=B8=20=EC=9A=94=EC=B2=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePolygon.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index 3e706b84..3bb004cf 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -755,10 +755,7 @@ export const usePolygon = () => { // innerLine이 세팅이 안되어있는경우 찾아서 세팅한다. if (!innerLines || innerLines.length === 0) { - let innerLineTypes = [] - Object.keys(LINE_TYPE.SUBLINE).forEach((key, value) => { - innerLineTypes.push(LINE_TYPE.SUBLINE[key]) - }) + let innerLineTypes = Object.keys(LINE_TYPE.SUBLINE).map((key, value) => LINE_TYPE.SUBLINE[key]) polygon.innerLines = canvas .getObjects() .filter( @@ -1102,6 +1099,8 @@ export const usePolygon = () => { } }) + // blue로 생성된 것들은 대표라인이 될 수 없음. + representLines = representLines.filter((line) => line.stroke !== 'blue') // representLines중 가장 긴 line을 찾는다. representLines.forEach((line) => { if (!representLine) {