- 외벽선 설정 팝업 수정
This commit is contained in:
parent
34701e865f
commit
8ef2fa35f3
@ -42,8 +42,6 @@ export default function CanvasMenu(props) {
|
|||||||
<li
|
<li
|
||||||
className={`canvas-menu-item ${menuNumber === 2 ? 'active' : ''}`}
|
className={`canvas-menu-item ${menuNumber === 2 ? 'active' : ''}`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!showOutlineModal) setShowOutlineModal(true)
|
|
||||||
// setModalOption({ ...modalOption, outerwall: true })
|
|
||||||
onClickNav(2)
|
onClickNav(2)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -85,10 +83,12 @@ export default function CanvasMenu(props) {
|
|||||||
<button className="btn02 active"></button>
|
<button className="btn02 active"></button>
|
||||||
<button className="btn03 "></button>
|
<button className="btn03 "></button>
|
||||||
</div>
|
</div>
|
||||||
<div className={`vertical-horizontal ${vertical ? 'on' : ''}`}>
|
{menuNumber !== 4 && (
|
||||||
<span>{getMessage('plan.mode.vertical.horizontal')}</span>
|
<div className={`vertical-horizontal ${vertical ? 'on' : ''}`}>
|
||||||
<button onClick={() => setVertical(!vertical)}>{vertical ? 'ON' : 'OFF'}</button>
|
<span>{getMessage('plan.mode.vertical.horizontal')}</span>
|
||||||
</div>
|
<button onClick={() => setVertical(!vertical)}>{vertical ? 'ON' : 'OFF'}</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="select-box">
|
<div className="select-box">
|
||||||
<QSelectBox title={'瓦53A'} option={SelectOption} />
|
<QSelectBox title={'瓦53A'} option={SelectOption} />
|
||||||
</div>
|
</div>
|
||||||
@ -149,9 +149,7 @@ export default function CanvasMenu(props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={`canvas-depth2-wrap ${menuNumber === 2 || menuNumber === 3 || menuNumber === 4 ? 'active' : ''}`}>
|
<div className={`canvas-depth2-wrap ${menuNumber === 2 || menuNumber === 3 || menuNumber === 4 ? 'active' : ''}`}>
|
||||||
{menuNumber === 2 && <MenuDepth01 {...menuProps} />}
|
{(menuNumber === 2 || menuNumber === 3 || menuNumber === 4) && <MenuDepth01 {...menuProps} />}
|
||||||
{menuNumber === 3 && <MenuDepth01 {...menuProps} />}
|
|
||||||
{menuNumber === 4 && <MenuDepth01 {...menuProps} />}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { useEffect, useState } from 'react'
|
|||||||
export default function MenuDepth01(props) {
|
export default function MenuDepth01(props) {
|
||||||
const { setShowOutlineModal, type } = props
|
const { setShowOutlineModal, type } = props
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [activeMenu, setActiveMenu] = useState(0)
|
const [activeMenu, setActiveMenu] = useState()
|
||||||
const onClickMenu = (menuNum) => {
|
const onClickMenu = (menuNum) => {
|
||||||
setActiveMenu(menuNum)
|
setActiveMenu(menuNum)
|
||||||
setShowOutlineModal(menuNum === 0)
|
setShowOutlineModal(menuNum === 0)
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useCallback, useEffect, useRef } from 'react'
|
import { useEffect, useRef } from 'react'
|
||||||
import WithDraggable from '@/components/common/draggable/withDraggable'
|
import WithDraggable from '@/components/common/draggable/withDraggable'
|
||||||
import { modalState } from '@/store/modalAtom'
|
|
||||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { useEvent } from '@/hooks/useEvent'
|
import { useEvent } from '@/hooks/useEvent'
|
||||||
@ -19,8 +18,8 @@ import {
|
|||||||
import { QLine } from '@/components/fabric/QLine'
|
import { QLine } from '@/components/fabric/QLine'
|
||||||
import { useLine } from '@/hooks/useLine'
|
import { useLine } from '@/hooks/useLine'
|
||||||
|
|
||||||
export default function OuterLineWall() {
|
export default function OuterLineWall(props) {
|
||||||
const [modalOption, setModalOption] = useRecoilState(modalState) //modal 열림닫힘 state
|
const { showOutlineModal, setShowOutlineModal } = props
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const { addCanvasMouseEventListener, addDocumentEventListener, removeAllDocumentEventListeners } = useEvent()
|
const { addCanvasMouseEventListener, addDocumentEventListener, removeAllDocumentEventListeners } = useEvent()
|
||||||
const { addLineText, removeLineText } = useLine()
|
const { addLineText, removeLineText } = useLine()
|
||||||
@ -339,10 +338,6 @@ export default function OuterLineWall() {
|
|||||||
setPoints((prev) => prev.slice(0, prev.length - 1))
|
setPoints((prev) => prev.slice(0, prev.length - 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClickClose = () => {
|
|
||||||
setModalOption({ ...modalOption, outerwall: false })
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleFix = () => {
|
const handleFix = () => {
|
||||||
setPoints((prev) => {
|
setPoints((prev) => {
|
||||||
if (prev.length === 0) {
|
if (prev.length === 0) {
|
||||||
@ -352,11 +347,11 @@ export default function OuterLineWall() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true}>
|
<WithDraggable isShow={true} pos={{ x: 50, y: -1000 + 50 }}>
|
||||||
<div className={`modal-pop-wrap ssm ${modalOption.outerwall ? 'mount' : ''} `}>
|
<div className={`modal-pop-wrap ssm ${showOutlineModal ? 'mount' : ''} `}>
|
||||||
<div className="modal-head">
|
<div className="modal-head">
|
||||||
<h1 className="title">{getMessage('modal.cover.outline.drawing')}</h1>
|
<h1 className="title">{getMessage('modal.cover.outline.drawing')}</h1>
|
||||||
<button className="modal-close" onClick={handleClickClose}>
|
<button className="modal-close" onClick={() => setShowOutlineModal(false)}>
|
||||||
닫기
|
닫기
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user