From a183453390d9c6d1f8f1ba1c69e5000a226231a2 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 10 Sep 2025 14:33:53 +0900 Subject: [PATCH] =?UTF-8?q?A,B=ED=83=80=EC=9E=85=20=EC=A7=80=EB=B6=95=20?= =?UTF-8?q?=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePolygon.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index a1cbc4f0..2ae37440 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -852,7 +852,10 @@ export const usePolygon = () => { if (checkLineOverlap(innerLine, polygonLine)) { // innerLine의 type을 polygonLine의 type으로 변경 if (innerLine.attributes && polygonLine.attributes.type) { - // polygonLine.need = false + // innerLine이 polygonLine보다 긴 경우 polygonLine.need를 false로 변경 + if (polygonLine.length < innerLine.length) { + polygonLine.need = false + } innerLine.attributes.planeSize = innerLine.attributes.planeSize ?? polygonLine.attributes.planeSize innerLine.attributes.actualSize = innerLine.attributes.actualSize ?? polygonLine.attributes.actualSize innerLine.attributes.type = polygonLine.attributes.type @@ -1008,6 +1011,9 @@ export const usePolygon = () => { /*const originInnerStroke = innerLine.stroke innerLine.set({ stroke: 'red' }) canvas.renderAll()*/ + if (checkLineOverlap(line, innerLine)) { + return + } if (isPointOnLine(line, innerLine.startPoint)) { canvas.renderAll() if (isSamePoint(line.startPoint, innerLine.startPoint) || isSamePoint(line.endPoint, innerLine.startPoint)) {