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 { } else {
router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`) router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`)
setType('module')
} }
await reloadCanvasStatus(objectNo, pid) await reloadCanvasStatus(objectNo, pid)
break break

View File

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

View File

@ -175,7 +175,7 @@ export default function PassivityCircuitAllocation(props) {
return { return {
roofSurfaceId: surface.id, roofSurfaceId: surface.id,
roofSurface: surface.direction, 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) => { moduleList: surface.modules.map((module) => {
return { return {
itemId: module.moduleInfo.itemId, itemId: module.moduleInfo.itemId,

View File

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

View File

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

View File

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