This commit is contained in:
hyojun.choi 2024-07-17 15:40:36 +09:00
parent 3ad555fd24
commit 99bed48fce

View File

@ -229,22 +229,21 @@ export function useMode() {
changeMode(canvas, Mode.EDIT)
if (historyPoints.current.length >= 4) {
drawWallPolygon()
// 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 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 = []
// // handleOuterlines()
// const wall = makePolygon()
// setWall(wall)
handleOuterlinesTest() //외곽선 그리기 테스트
handleOuterlinesTest()
const wall = makePolygon()
setWall(wall)
}
}