외벽선 그리기 후 팝업 내용 수정
This commit is contained in:
parent
a24789d34f
commit
7e05602175
@ -122,17 +122,19 @@ export function usePropertiesSetting(id) {
|
|||||||
const handleFix = () => {
|
const handleFix = () => {
|
||||||
const isClose = confirm('외벽선 속성 설정을 완료하시겠습니까?')
|
const isClose = confirm('외벽선 속성 설정을 완료하시겠습니까?')
|
||||||
if (isClose) {
|
if (isClose) {
|
||||||
closePopup(id)
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
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)
|
const notSetAttributes = lines.filter((line) => !line.attributes?.type)
|
||||||
if (notSetAttributes.length > 0) {
|
if (notSetAttributes.length > 0) {
|
||||||
alert('설정되지 않은 외벽선이 있습니다.')
|
// 세팅이 하나라도 안되어있으면 초기화
|
||||||
|
lines.forEach((line) => {
|
||||||
|
line.set({
|
||||||
|
stroke: '#000000',
|
||||||
|
strokeWidth: 4,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
canvas.discardActiveObject()
|
||||||
|
closePopup(id)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +157,12 @@ export function usePropertiesSetting(id) {
|
|||||||
setPoints([])
|
setPoints([])
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
roof.drawHelpLine()
|
roof.drawHelpLine()
|
||||||
|
|
||||||
closePopup(id)
|
closePopup(id)
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeModal = (fn) => {
|
const closeModal = (fn) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user