polygonLines가 없는 경우 처리

This commit is contained in:
hyojun.choi 2025-05-07 10:46:57 +09:00
parent a7eb2f7598
commit 92c33c9c11

View File

@ -949,7 +949,8 @@ export const usePolygon = () => {
//polygonLines에서 divideLines를 제거하고 newLines를 추가한다.
newLines = newLines.filter((line) => !(Math.abs(line.startPoint.x - line.endPoint.x) < 1 && Math.abs(line.startPoint.y - line.endPoint.y) < 1))
polygonLines = polygonLines.filter((line) => line.intersections?.length === 0)
polygonLines = polygonLines.filter((line) => !line.intersections || line.intersections.length === 0)
polygonLines = [...polygonLines, ...newLines]