canvas 시작시 오류 수정

This commit is contained in:
yjnoh 2025-05-14 09:59:46 +09:00
parent 3fefb4b22f
commit 2f5f49c69c
2 changed files with 3 additions and 6 deletions

View File

@ -37,6 +37,7 @@ export function useCanvasPopupStatusController(param = 1) {
* @returns
*/
const getModuleSelection = async (popupTypeParam) => {
if (!currentCanvasPlan.objectNo || !currentCanvasPlan.planNo) return
const result = await promiseGet({
url: `/api/v1/canvas-popup-status?objectNo=${currentCanvasPlan.objectNo}&planNo=${currentCanvasPlan.planNo}&popupType=${popupTypeParam}`,
})
@ -48,7 +49,7 @@ export function useCanvasPopupStatusController(param = 1) {
return null
})
return result.data
return result?.data
}
/**
@ -59,7 +60,7 @@ export function useCanvasPopupStatusController(param = 1) {
let resultData = {}
for (let i = 1; i < 3; i++) {
const result = await getModuleSelection(i)
if (!result.objectNo) return
if (!result?.objectNo) return
if (i === 1) {
if (result.popupStatus && unescapeString(result.popupStatus)) {
const data = JSON.parse(unescapeString(result.popupStatus))

View File

@ -72,16 +72,12 @@ export function useSurfaceShapeBatch({ isHidden, setIsHidden }) {
length5 = surfaceRefs.length5.current.value
}
console.log(' before length : ', length1, length2, length3, length4, length5)
length1 = parseFloat(length1 === undefined ? 0 : Number(length1 / 10).toFixed(1))
length2 = parseFloat(length2 === undefined ? 0 : Number(length2 / 10).toFixed(1))
length3 = parseFloat(length3 === undefined ? 0 : Number(length3 / 10).toFixed(1))
length4 = parseFloat(length4 === undefined ? 0 : Number(length4 / 10).toFixed(1))
length5 = parseFloat(length5 === undefined ? 0 : Number(length5 / 10).toFixed(1))
console.log(' after length : ', length1, length2, length3, length4, length5)
let isDrawing = true
let obj = null
let points = []