From 0bea97513038860ff56f6201272a6cf47e5ce340 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Mon, 21 Jul 2025 11:38:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=80=EB=B6=95=EB=A9=B4=20=ED=95=A0?= =?UTF-8?q?=EB=8B=B9=20=EC=8B=9C=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePolygon.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index f59a9b22..b66996cb 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -833,12 +833,17 @@ export const usePolygon = () => { return !(range1.max < range2.min || range2.max < range1.min) } + polygonLines.forEach((line) => { + line.need = true + }) + // innerLines와 polygonLines의 겹침을 확인하고 type 변경 innerLines.forEach((innerLine) => { polygonLines.forEach((polygonLine) => { if (checkLineOverlap(innerLine, polygonLine)) { // innerLine의 type을 polygonLine의 type으로 변경 if (polygonLine.attributes?.type && innerLine.attributes) { + polygonLine.need = false innerLine.attributes.type = polygonLine.attributes.type } } @@ -846,6 +851,7 @@ export const usePolygon = () => { }) const roofs = [] + polygonLines = polygonLines.filter((line) => line.need) //polygonLines를 순회하며 innerLines와 교차하는 점을 line의 속성에 배열로 저장한다. polygonLines.forEach((line) => {