fix: setMode default 추가

This commit is contained in:
yoosangwook 2024-08-01 16:58:42 +09:00
parent 4c96ad2b99
commit 995591a64d

View File

@ -3327,21 +3327,22 @@ export function useMode() {
const makeRoofFillCells = () => {
// const selectedCellRoofs = selectedCellRoofArray
if (selectedCellRoofArray.length === 0) {
console.log('선택된 영역이 없습니다.')
return
}
const inputCellSize = { width: 172, height: 113 }
const cellSize = { ...inputCellSize } //기본으로 가로형으로 넣고
alert('선택된 영역이 없습니다.')
setMode('default')
} else {
const inputCellSize = { width: 172, height: 113 }
const cellSize = { ...inputCellSize } //기본으로 가로형으로 넣고
if (templateType === 2) {
// ;[cellSize.width, cellSize.height] = [cellSize.height, cellSize.width]
cellSize.width = inputCellSize.height
cellSize.height = inputCellSize.width
}
if (templateType === 2) {
// ;[cellSize.width, cellSize.height] = [cellSize.height, cellSize.width]
cellSize.width = inputCellSize.height
cellSize.height = inputCellSize.width
}
selectedCellRoofArray.forEach((polygon, index) => {
polygon.fillCell({ width: cellSize.width, height: cellSize.height, padding: 10 })
})
selectedCellRoofArray.forEach((polygon, index) => {
polygon.fillCell({ width: cellSize.width, height: cellSize.height, padding: 10 })
})
}
}
return {