86er1b9x1 - 지붕형상 설정 - 변별로 설정 적용 수정

This commit is contained in:
hyojun.choi 2024-12-23 10:25:31 +09:00
parent e322f36e13
commit f4f885dda9

View File

@ -595,17 +595,23 @@ export function useRoofShapeSetting(id) {
break break
} }
} }
selectedLine.attributes = attributes selectedLine.attributes = { ...attributes, isFixed: true }
history.current.push(selectedLine)
canvas.renderAll() canvas.renderAll()
nextLineFocus(selectedLine) nextLineFocus(selectedLine)
} }
const nextLineFocus = (selectedLine) => { const nextLineFocus = (selectedLine) => {
const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine') const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
const index = lines.findIndex((line) => line.idx === selectedLine.idx) const index = lines.findIndex((line) => line.idx === selectedLine.idx)
const nextLine = lines[index + 1] || lines[0] const nextLine = lines[index + 1] || lines[0]
if (nextLine.attributes.isFixed) {
canvas.discardActiveObject()
return
}
history.current.push(selectedLine)
canvas.setActiveObject(nextLine) canvas.setActiveObject(nextLine)
} }