설정되지 않은 외벽선이 있을 경우 확정 못하도록 수정

This commit is contained in:
hyojun.choi 2024-11-15 10:45:53 +09:00
parent 7016eacbf5
commit 8e2e715d48

View File

@ -125,6 +125,12 @@ export function usePropertiesSetting(id) {
} }
const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine') const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
const notSetAttributes = lines.filter((line) => !line.attributes?.type)
if (notSetAttributes.length > 0) {
alert('설정되지 않은 외벽선이 있습니다.')
return
}
lines.forEach((line) => { lines.forEach((line) => {
line.set({ line.set({
attributes: line.attributes ? line.attributes : { offset: 0, type: LINE_TYPE.WALLLINE.WALL }, attributes: line.attributes ? line.attributes : { offset: 0, type: LINE_TYPE.WALLLINE.WALL },