가대 visible 수정
This commit is contained in:
parent
77c1c9c3a0
commit
7fe794b879
@ -5,7 +5,7 @@ import { moduleSelectionDataState } from '@/store/selectedModuleOptions'
|
|||||||
import { getDegreeByChon } from '@/util/canvas-util'
|
import { getDegreeByChon } from '@/util/canvas-util'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
import { useMasterController } from '@/hooks/common/useMasterController'
|
import { useMasterController } from '@/hooks/common/useMasterController'
|
||||||
import { basicSettingState } from '@/store/settingAtom'
|
import { basicSettingState, trestleDisplaySelector } from '@/store/settingAtom'
|
||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
|
|
||||||
// 회로 및 가대설정
|
// 회로 및 가대설정
|
||||||
@ -15,6 +15,7 @@ export const useTrestle = () => {
|
|||||||
const { getQuotationItem } = useMasterController()
|
const { getQuotationItem } = useMasterController()
|
||||||
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
||||||
const roofSizeSet = useRecoilValue(basicSettingState).roofSizeSet
|
const roofSizeSet = useRecoilValue(basicSettingState).roofSizeSet
|
||||||
|
const isTrestleDisplay = useRecoilValue(trestleDisplaySelector)
|
||||||
const { swalFire } = useSwal()
|
const { swalFire } = useSwal()
|
||||||
const apply = () => {
|
const apply = () => {
|
||||||
try {
|
try {
|
||||||
@ -135,6 +136,7 @@ export const useTrestle = () => {
|
|||||||
selectable: false,
|
selectable: false,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
})
|
})
|
||||||
canvas.add(eaveBar)
|
canvas.add(eaveBar)
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
@ -165,6 +167,7 @@ export const useTrestle = () => {
|
|||||||
selectable: false,
|
selectable: false,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
})
|
})
|
||||||
canvas.add(halfEaveBar)
|
canvas.add(halfEaveBar)
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
@ -193,6 +196,7 @@ export const useTrestle = () => {
|
|||||||
strokeWidth: 4,
|
strokeWidth: 4,
|
||||||
selectable: false,
|
selectable: false,
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
})
|
})
|
||||||
canvas.add(halfEaveBar)
|
canvas.add(halfEaveBar)
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
@ -918,7 +922,7 @@ export const useTrestle = () => {
|
|||||||
offsetX: 0,
|
offsetX: 0,
|
||||||
offsetY: 0,
|
offsetY: 0,
|
||||||
},
|
},
|
||||||
|
visible: isTrestleDisplay,
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
supFitQty,
|
supFitQty,
|
||||||
@ -952,6 +956,7 @@ export const useTrestle = () => {
|
|||||||
},
|
},
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
supFitQty,
|
supFitQty,
|
||||||
supFitIntvlPct,
|
supFitIntvlPct,
|
||||||
rackLen,
|
rackLen,
|
||||||
@ -992,6 +997,7 @@ export const useTrestle = () => {
|
|||||||
},
|
},
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
supFitQty,
|
supFitQty,
|
||||||
supFitIntvlPct,
|
supFitIntvlPct,
|
||||||
rackLen: rackLength,
|
rackLen: rackLength,
|
||||||
@ -1022,6 +1028,7 @@ export const useTrestle = () => {
|
|||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
strokeWidth: 4,
|
strokeWidth: 4,
|
||||||
selectable: false,
|
selectable: false,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
supFitQty,
|
supFitQty,
|
||||||
supFitIntvlPct,
|
supFitIntvlPct,
|
||||||
rackLen,
|
rackLen,
|
||||||
@ -1062,6 +1069,7 @@ export const useTrestle = () => {
|
|||||||
},
|
},
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
supFitQty,
|
supFitQty,
|
||||||
supFitIntvlPct,
|
supFitIntvlPct,
|
||||||
rackLen: rackLength,
|
rackLen: rackLength,
|
||||||
@ -1090,6 +1098,7 @@ export const useTrestle = () => {
|
|||||||
},
|
},
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
strokeWidth: 4,
|
strokeWidth: 4,
|
||||||
selectable: false,
|
selectable: false,
|
||||||
supFitQty,
|
supFitQty,
|
||||||
@ -1130,6 +1139,7 @@ export const useTrestle = () => {
|
|||||||
},
|
},
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
supFitQty,
|
supFitQty,
|
||||||
supFitIntvlPct,
|
supFitIntvlPct,
|
||||||
rackLen,
|
rackLen,
|
||||||
@ -1158,6 +1168,7 @@ export const useTrestle = () => {
|
|||||||
},
|
},
|
||||||
parentId: module.id,
|
parentId: module.id,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
strokeWidth: 4,
|
strokeWidth: 4,
|
||||||
selectable: false,
|
selectable: false,
|
||||||
supFitQty,
|
supFitQty,
|
||||||
@ -1209,6 +1220,7 @@ export const useTrestle = () => {
|
|||||||
fill: 'green',
|
fill: 'green',
|
||||||
name: 'bracket',
|
name: 'bracket',
|
||||||
parentId: rack.parentId,
|
parentId: rack.parentId,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
width: bracketLength,
|
width: bracketLength,
|
||||||
height: bracketLength,
|
height: bracketLength,
|
||||||
@ -1228,6 +1240,7 @@ export const useTrestle = () => {
|
|||||||
fill: 'green',
|
fill: 'green',
|
||||||
name: 'bracket',
|
name: 'bracket',
|
||||||
parentId: rack.parentId,
|
parentId: rack.parentId,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
width: bracketLength,
|
width: bracketLength,
|
||||||
height: bracketLength,
|
height: bracketLength,
|
||||||
@ -1246,6 +1259,7 @@ export const useTrestle = () => {
|
|||||||
top: y2 - bracketLength / 3,
|
top: y2 - bracketLength / 3,
|
||||||
fill: 'green',
|
fill: 'green',
|
||||||
parentId: rack.parentId,
|
parentId: rack.parentId,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
name: 'bracket',
|
name: 'bracket',
|
||||||
width: bracketLength,
|
width: bracketLength,
|
||||||
@ -1266,6 +1280,7 @@ export const useTrestle = () => {
|
|||||||
fill: 'green',
|
fill: 'green',
|
||||||
name: 'bracket',
|
name: 'bracket',
|
||||||
parentId: rack.parentId,
|
parentId: rack.parentId,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
surfaceId: surface.id,
|
surfaceId: surface.id,
|
||||||
width: bracketLength,
|
width: bracketLength,
|
||||||
height: bracketLength,
|
height: bracketLength,
|
||||||
@ -1431,6 +1446,7 @@ export const useTrestle = () => {
|
|||||||
width: 10,
|
width: 10,
|
||||||
height: 10,
|
height: 10,
|
||||||
selectable: false,
|
selectable: false,
|
||||||
|
visible: isTrestleDisplay,
|
||||||
})
|
})
|
||||||
canvas.add(bracket)
|
canvas.add(bracket)
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user