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