지붕형상 설정시 다른 roof 제거되는 현상 수정

This commit is contained in:
hyojun.choi 2024-11-11 09:50:25 +09:00
parent 21d758834d
commit d213f59ff9

View File

@ -167,8 +167,6 @@ export function useRoofShapeSetting(id) {
]
const handleSave = () => {
//기존 wallLine 삭제
let outerLines
let direction
@ -379,20 +377,20 @@ export function useRoofShapeSetting(id) {
}
// 기존 wallLine, roofBase 제거
canvas
/*canvas
.getObjects()
.filter((obj) => obj.name === POLYGON_TYPE.WALL)
.forEach((line) => {
canvas.remove(line)
})
})*/
canvas
/*canvas
.getObjects()
.filter((obj) => obj.name === POLYGON_TYPE.ROOF)
.forEach((obj) => {
canvas.remove(...obj.innerLines)
canvas.remove(obj)
})
})*/
const polygon = addPolygonByLines(outerLines, { name: POLYGON_TYPE.WALL, direction })
polygon.lines = [...outerLines]
@ -402,7 +400,6 @@ export function useRoofShapeSetting(id) {
canvas?.renderAll()
roof.drawHelpLine()
// setShowRoofShapeSettingModal(false)
isFixRef.current = true
closePopup(id)
}