외벽선 그린 후, 지붕형상 수동 설정 시 오류

This commit is contained in:
hyojun.choi 2025-02-06 17:45:01 +09:00
parent 01b045c5ac
commit d923b8acff
2 changed files with 17 additions and 3 deletions

View File

@ -445,9 +445,9 @@ export function useRoofAllocationSetting(id) {
setCurrentRoofList(newRoofList)
}
const handleChangeInput = (e, type, index) => {
const handleChangeInput = (e, type = '', index) => {
const value = e.target.value
if (type === 'pitch') {
/*if (type === 'pitch') {
// type이 pitch인 경우 소수점 1자리까지만 입력 가능
const reg = /^[0-9]+(\.[0-9]{0,1})?$/
@ -481,7 +481,7 @@ export function useRoofAllocationSetting(id) {
}
return
}
}*/
const newRoofList = currentRoofList.map((roof, idx) => {
if (idx === index) {

View File

@ -203,6 +203,20 @@ export function useRoofShapePassivitySetting(id) {
const roofBases = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
const exceptObjs = canvas.getObjects().filter((obj) => obj.name !== 'outerLine' && obj.parent?.name !== 'outerLine')
const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
let checkedAllSetting = true
lines.forEach((line) => {
if (!line.attributes) {
checkedAllSetting = false
}
})
if (!checkedAllSetting) {
swalFire({ text: '설정이 완료되지 않은 외벽선이 있습니다.', icon: 'warning' })
return
}
exceptObjs.forEach((obj) => {
canvas.remove(obj)
})