모듈 관련 contextmenu 기능 추가

This commit is contained in:
김민식 2025-03-07 15:44:50 +09:00
parent 8f88e6637c
commit 035e513780
2 changed files with 8 additions and 4 deletions

View File

@ -934,6 +934,9 @@ export function useModule() {
.getObjects()
.filter((obj) => obj.surfaceId === activeModule.surfaceId && obj.name === POLYGON_TYPE.MODULE && activeModule.id !== obj.id)
const surface = canvas.getObjects().find((obj) => obj.id === activeModule.surfaceId && obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
if (surface.isComplete) {
removeTrestleMaterials()
}
if (activeModule.circuit) {
swalFire({
title: getMessage('can.not.remove.module'),

View File

@ -644,7 +644,7 @@ export function useContextMenu() {
})
return
}
resetModule()
addPopup(popupId, 1, <PanelEdit id={popupId} type={PANEL_EDIT_TYPE.COLUMN_MOVE} />)
},
},
@ -660,7 +660,7 @@ export function useContextMenu() {
})
return
}
resetModule()
addPopup(popupId, 1, <PanelEdit id={popupId} type={PANEL_EDIT_TYPE.COLUMN_COPY} />)
},
// component: <PanelEdit id={popupId} type={PANEL_EDIT_TYPE.COLUMN_COPY} />,
@ -703,7 +703,7 @@ export function useContextMenu() {
})
return
}
resetModule()
addPopup(popupId, 1, <PanelEdit id={popupId} type={PANEL_EDIT_TYPE.ROW_MOVE} />)
},
// component: <PanelEdit id={popupId} type={PANEL_EDIT_TYPE.ROW_MOVE} />,
@ -720,7 +720,7 @@ export function useContextMenu() {
})
return
}
resetModule()
addPopup(popupId, 1, <PanelEdit id={popupId} type={PANEL_EDIT_TYPE.ROW_COPY} />)
},
// component: <PanelEdit id={popupId} type={PANEL_EDIT_TYPE.ROW_COPY} />,
@ -785,6 +785,7 @@ export function useContextMenu() {
return
}
resetModule()
alignModule(MODULE_ALIGN_TYPE.HORIZONTAL, currentObject.arrayData ?? [currentObject])
},
},