회로구성이 완료되면 이동, 복사 및 삭제가 안되도록 수정
This commit is contained in:
parent
0a24c23bf1
commit
6b3d0ea6ff
@ -412,6 +412,9 @@ export function useModule() {
|
||||
}
|
||||
|
||||
const moduleColumnRemove = (type) => {
|
||||
if (isFixedModule()) {
|
||||
return
|
||||
}
|
||||
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
|
||||
if (activeModule.circuit) {
|
||||
swalFire({
|
||||
@ -535,6 +538,9 @@ export function useModule() {
|
||||
}
|
||||
|
||||
const moduleRowRemove = (type) => {
|
||||
if (isFixedModule()) {
|
||||
return
|
||||
}
|
||||
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
|
||||
const rowModules = getRowModules(activeModule)
|
||||
const otherModules = getOtherModules(rowModules)
|
||||
@ -651,6 +657,9 @@ export function useModule() {
|
||||
}
|
||||
|
||||
const moduleColumnInsert = (type) => {
|
||||
if (isFixedModule()) {
|
||||
return
|
||||
}
|
||||
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
|
||||
const columnModules = getColumnModules(activeModule)
|
||||
let otherModules = getOtherModules(columnModules)
|
||||
@ -750,7 +759,25 @@ export function useModule() {
|
||||
setModuleStatisticsData()
|
||||
}
|
||||
|
||||
const isFixedModule = () => {
|
||||
const completeSurfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.isComplete)
|
||||
|
||||
if (completeSurfaces.length > 0) {
|
||||
swalFire({
|
||||
title: getMessage('modal.module.can.not.edit'),
|
||||
type: 'alert',
|
||||
icon: 'error',
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
const muduleRowInsert = (type) => {
|
||||
if (isFixedModule()) {
|
||||
return
|
||||
}
|
||||
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
|
||||
const rowModules = getRowModules(activeModule)
|
||||
let otherModules = getOtherModules(rowModules)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user