변별로 설정 완료되지 않은 경우 수정

This commit is contained in:
hyojun.choi 2025-02-08 13:35:46 +09:00
parent 53d3a80544
commit d676782451

View File

@ -190,7 +190,9 @@ export function useRoofShapeSetting(id) {
} }
case 4: { case 4: {
outerLines = canvas.getObjects().filter((obj) => obj.name === 'outerLine') outerLines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
const pitch = outerLines.find((line) => line.attributes.type === LINE_TYPE.WALLLINE.SHED)?.attributes.pitch const pitch = outerLines.find((line) => line.attributes.type === LINE_TYPE.WALLLINE.SHED)?.attributes.pitch
let isValid = outerLines.every((line) => line.attributes.isFixed)
// 변별로 설정중 한쪽흐름일 경우 한쪽흐름의 pitch로 설정 // 변별로 설정중 한쪽흐름일 경우 한쪽흐름의 pitch로 설정
if (pitch) { if (pitch) {
outerLines.forEach((line) => { outerLines.forEach((line) => {
@ -203,6 +205,10 @@ export function useRoofShapeSetting(id) {
} }
}) })
} }
if (!isValid) {
swalFire({ text: '설정이 완료되지 않았습니다.', icon: 'error' })
return
}
break break
} }