Merge branch 'dev' of https://git.hanasys.jp/qcast3/qcast-front into feature/skeleton-dev
This commit is contained in:
commit
5105c05080
@ -133,6 +133,11 @@ export default function AuxiliaryDrawing({ id, pos = { x: 50, y: 230 } }) {
|
||||
}
|
||||
|
||||
const onClickButton = (button) => {
|
||||
if (buttonAct === button.id || type === button.type) {
|
||||
setButtonAct(null)
|
||||
setType(null)
|
||||
return
|
||||
}
|
||||
setButtonAct(button.id)
|
||||
setType(button.type)
|
||||
}
|
||||
|
||||
@ -10,9 +10,7 @@ import { adsorptionPointAddModeState, canGridOptionSeletor, tempGridModeState }
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import { usePopup } from '@/hooks/usePopup'
|
||||
import { useCanvasSetting } from '@/hooks/option/useCanvasSetting'
|
||||
import { useTempGrid } from '@/hooks/useTempGrid'
|
||||
import { settingModalGridOptionsState } from '@/store/settingAtom'
|
||||
import { useEvent } from '@/hooks/useEvent'
|
||||
|
||||
export default function SettingModal01(props) {
|
||||
const { id } = props
|
||||
@ -102,11 +100,11 @@ export default function SettingModal01(props) {
|
||||
<button className={`btn-frame modal ${buttonAct === 2 ? 'act' : ''}`} onClick={() => handleBtnClick(2)}>
|
||||
{getMessage('modal.canvas.setting.font.plan')}
|
||||
</button>
|
||||
{canGridOptionSeletorValue && (
|
||||
{/*{canGridOptionSeletorValue && (
|
||||
<button className={`btn-frame modal ${buttonAct === 3 ? 'act' : ''}`} onClick={() => handleBtnClick(3)}>
|
||||
{getMessage('modal.canvas.setting.grid')}
|
||||
</button>
|
||||
)}
|
||||
)}*/}
|
||||
</div>
|
||||
{buttonAct === 1 && <FirstOption {...firstProps} />}
|
||||
{buttonAct === 2 && <SecondOption {...secondProps} />}
|
||||
|
||||
@ -77,6 +77,13 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) {
|
||||
useEffect(() => {
|
||||
typeRef.current = type
|
||||
clear()
|
||||
if (type === null) {
|
||||
initEvent()
|
||||
return
|
||||
}
|
||||
initEvent()
|
||||
addCanvasMouseEventListener('mouse:move', mouseMove)
|
||||
addCanvasMouseEventListener('mouse:down', mouseDown)
|
||||
addDocumentEventListener('keydown', document, keydown[type])
|
||||
}, [type])
|
||||
|
||||
@ -133,7 +140,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) {
|
||||
// roofs의 innerLines에서 object와 같은 것을 찾아서 제거
|
||||
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||
roofs.forEach((roof) => {
|
||||
roof.innerLines = roof.innerLines.filter(inner => inner !== object)
|
||||
roof.innerLines = roof.innerLines.filter((inner) => inner !== object)
|
||||
})
|
||||
|
||||
canvas.remove(object)
|
||||
|
||||
@ -334,6 +334,9 @@ export function useRoofAllocationSetting(id) {
|
||||
name: 'originRoofOuterLine',
|
||||
visible: outlineDisplay,
|
||||
})
|
||||
wallLine.texts.forEach((text) => {
|
||||
canvas.remove(text)
|
||||
})
|
||||
})
|
||||
canvas.renderAll()
|
||||
}
|
||||
@ -556,11 +559,6 @@ export function useRoofAllocationSetting(id) {
|
||||
canvas.remove(roofBase)
|
||||
})
|
||||
|
||||
/** 벽면 삭제 */
|
||||
wallLines.forEach((wallLine) => {
|
||||
canvas.remove(wallLine)
|
||||
})
|
||||
|
||||
/** 데이터 설정 */
|
||||
const newRoofList = currentRoofList.map((roof, idx) => {
|
||||
return { ...roof, index: idx, ...basicInfo, raft: roof.raft ? roof.raft : roof.raftBaseCd }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user