This commit is contained in:
hyojun.choi 2025-02-19 17:18:02 +09:00
commit 80b99a1ea9
6 changed files with 10 additions and 9 deletions

View File

@ -216,6 +216,7 @@ export default function CanvasMenu(props) {
}
} else {
router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`)
setType('module')
}
await reloadCanvasStatus(objectNo, pid)
break

View File

@ -322,7 +322,7 @@ export default function StepUp(props) {
moduleList: formatModuleList(rsf.moduleList),
roofSurface: rsf.roofSurface ? rsf.roofSurface : '',
roofSurfaceId: rsf.roofSurfaceId ? rsf.roofSurfaceId : '',
roofSurfaceIncl: rsf.roofSurfaceIncl ? rsf.roofSurfaceIncl : '',
roofSurfaceIncl: rsf.roofSurfaceIncl ? +rsf.roofSurfaceIncl : '',
}))
}
// PCS MatModule

View File

@ -175,7 +175,7 @@ export default function PassivityCircuitAllocation(props) {
return {
roofSurfaceId: surface.id,
roofSurface: surface.direction,
roofSurfaceIncl: canvas.getObjects().filter((obj) => obj.id === surface.parentId)[0].pitch,
roofSurfaceIncl: +canvas.getObjects().filter((obj) => obj.id === surface.parentId)[0].pitch,
moduleList: surface.modules.map((module) => {
return {
itemId: module.moduleInfo.itemId,

View File

@ -33,9 +33,9 @@ const PlacementSurface = forwardRef((props, refs) => {
imageRotate = Math.abs(rotate % 4)
} else {
if (rotate < 0) {
imageRotate = Math.abs((rotate + 2) % 4)
} else {
imageRotate = Math.abs((rotate - 2) % 4)
} else {
imageRotate = Math.abs((rotate + 2) % 4)
}
}
} else {

View File

@ -113,9 +113,9 @@ export function useSurfaceShapeBatch({ isHidden, setIsHidden }) {
let imageRotate = 0
if (xInversion && !yInversion) {
if (rotate % 180 === 0 || rotate < 0) {
imageRotate = Math.abs(rotate % 360)
imageRotate = Math.abs((rotate - 180) % 360)
} else {
imageRotate = Math.abs((rotate - 180) % 4)
imageRotate = Math.abs((rotate + 180) % 4)
}
} else if (xInversion && yInversion) {
imageRotate = Math.abs((rotate + 360) % 360)
@ -126,9 +126,9 @@ export function useSurfaceShapeBatch({ isHidden, setIsHidden }) {
imageRotate = Math.abs(rotate % 360)
} else {
if (rotate < 0) {
imageRotate = Math.abs((rotate + 180) % 360)
} else {
imageRotate = Math.abs((rotate - 180) % 360)
} else {
imageRotate = Math.abs((rotate + 180) % 360)
}
}
} else {

View File

@ -83,7 +83,7 @@ export function useCircuitTrestle() {
.getObjects()
.filter((o) => o.id === obj.parentId)[0]
.directionText.replace(/[0-9]/g, ''),
roofSurfaceIncl: canvas.getObjects().filter((o) => o.id === obj.parentId)[0].roofMaterial.pitch,
roofSurfaceIncl: +canvas.getObjects().filter((o) => o.id === obj.parentId)[0].roofMaterial.pitch,
moduleList: getModuleList(obj).map((module) => {
return {
itemId: module.moduleInfo.itemId,