diff --git a/src/hooks/useMode.js b/src/hooks/useMode.js index 5a0027db..73cc50e7 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)