From 2f4560c2c9497b4f92f7a24b62fc2b4c301b55a0 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Fri, 19 Jul 2024 14:28:06 +0900 Subject: [PATCH] =?UTF-8?q?templateMode=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useMode.js | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/hooks/useMode.js b/src/hooks/useMode.js index 483ac98f..d1a60e04 100644 --- a/src/hooks/useMode.js +++ b/src/hooks/useMode.js @@ -211,24 +211,10 @@ export function useMode() { changeMode(canvas, Mode.EDIT) if (historyPoints.current.length >= 4) { - // handleOuterlinesTest() //외곽선 그리기 테스트 - // drawWallPolygon() - //아래 내용 drawWallPolygon()으로 대체 - const firstPoint = historyPoints.current[0] - const lastPoint = historyPoints.current[historyPoints.current.length - 1] - historyPoints.current.forEach((point) => { - canvas?.remove(point) - }) - drawLineWithLength(lastPoint, firstPoint) - points.current = [] - historyPoints.current = [] - - const roof = handleOuterlinesTest() - const wall = makePolygon() - - roof.setWall(wall) - setWall(wall) - roof.drawHelpLine() + const wall = drawWallPolygon() + handleOuterlinesTest2(wall) + /*setWall(wall) + roof.drawHelpLine()*/ } } @@ -732,6 +718,8 @@ export function useMode() { const handleOuterlinesTest = (polygon, offset = 71) => { var offsetPoints = [] + debugger + const sortedIndex = getStartIndex(polygon.lines) let tmpArraySorted = rearrangeArray(polygon.lines, sortedIndex)