Compare commits
No commits in common. "466712f993fd9cacb53d668ce1fd81044e9c9fd3" and "ec55884dd1bf0a04696406e775170a1f08afc9c6" have entirely different histories.
466712f993
...
ec55884dd1
@ -133,11 +133,6 @@ export default function AuxiliaryDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onClickButton = (button) => {
|
const onClickButton = (button) => {
|
||||||
if (buttonAct === button.id || type === button.type) {
|
|
||||||
setButtonAct(null)
|
|
||||||
setType(null)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
setButtonAct(button.id)
|
setButtonAct(button.id)
|
||||||
setType(button.type)
|
setType(button.type)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,9 @@ import { adsorptionPointAddModeState, canGridOptionSeletor, tempGridModeState }
|
|||||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
import { useCanvasSetting } from '@/hooks/option/useCanvasSetting'
|
import { useCanvasSetting } from '@/hooks/option/useCanvasSetting'
|
||||||
|
import { useTempGrid } from '@/hooks/useTempGrid'
|
||||||
import { settingModalGridOptionsState } from '@/store/settingAtom'
|
import { settingModalGridOptionsState } from '@/store/settingAtom'
|
||||||
|
import { useEvent } from '@/hooks/useEvent'
|
||||||
|
|
||||||
export default function SettingModal01(props) {
|
export default function SettingModal01(props) {
|
||||||
const { id } = props
|
const { id } = props
|
||||||
@ -100,11 +102,11 @@ export default function SettingModal01(props) {
|
|||||||
<button className={`btn-frame modal ${buttonAct === 2 ? 'act' : ''}`} onClick={() => handleBtnClick(2)}>
|
<button className={`btn-frame modal ${buttonAct === 2 ? 'act' : ''}`} onClick={() => handleBtnClick(2)}>
|
||||||
{getMessage('modal.canvas.setting.font.plan')}
|
{getMessage('modal.canvas.setting.font.plan')}
|
||||||
</button>
|
</button>
|
||||||
{/*{canGridOptionSeletorValue && (
|
{canGridOptionSeletorValue && (
|
||||||
<button className={`btn-frame modal ${buttonAct === 3 ? 'act' : ''}`} onClick={() => handleBtnClick(3)}>
|
<button className={`btn-frame modal ${buttonAct === 3 ? 'act' : ''}`} onClick={() => handleBtnClick(3)}>
|
||||||
{getMessage('modal.canvas.setting.grid')}
|
{getMessage('modal.canvas.setting.grid')}
|
||||||
</button>
|
</button>
|
||||||
)}*/}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{buttonAct === 1 && <FirstOption {...firstProps} />}
|
{buttonAct === 1 && <FirstOption {...firstProps} />}
|
||||||
{buttonAct === 2 && <SecondOption {...secondProps} />}
|
{buttonAct === 2 && <SecondOption {...secondProps} />}
|
||||||
|
|||||||
@ -77,13 +77,6 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
typeRef.current = type
|
typeRef.current = type
|
||||||
clear()
|
clear()
|
||||||
if (type === null) {
|
|
||||||
initEvent()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
initEvent()
|
|
||||||
addCanvasMouseEventListener('mouse:move', mouseMove)
|
|
||||||
addCanvasMouseEventListener('mouse:down', mouseDown)
|
|
||||||
addDocumentEventListener('keydown', document, keydown[type])
|
addDocumentEventListener('keydown', document, keydown[type])
|
||||||
}, [type])
|
}, [type])
|
||||||
|
|
||||||
@ -140,7 +133,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) {
|
|||||||
// roofs의 innerLines에서 object와 같은 것을 찾아서 제거
|
// roofs의 innerLines에서 object와 같은 것을 찾아서 제거
|
||||||
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||||
roofs.forEach((roof) => {
|
roofs.forEach((roof) => {
|
||||||
roof.innerLines = roof.innerLines.filter((inner) => inner !== object)
|
roof.innerLines = roof.innerLines.filter(inner => inner !== object)
|
||||||
})
|
})
|
||||||
|
|
||||||
canvas.remove(object)
|
canvas.remove(object)
|
||||||
|
|||||||
@ -334,9 +334,6 @@ export function useRoofAllocationSetting(id) {
|
|||||||
name: 'originRoofOuterLine',
|
name: 'originRoofOuterLine',
|
||||||
visible: outlineDisplay,
|
visible: outlineDisplay,
|
||||||
})
|
})
|
||||||
wallLine.texts.forEach((text) => {
|
|
||||||
canvas.remove(text)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
}
|
}
|
||||||
@ -559,6 +556,11 @@ export function useRoofAllocationSetting(id) {
|
|||||||
canvas.remove(roofBase)
|
canvas.remove(roofBase)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/** 벽면 삭제 */
|
||||||
|
wallLines.forEach((wallLine) => {
|
||||||
|
canvas.remove(wallLine)
|
||||||
|
})
|
||||||
|
|
||||||
/** 데이터 설정 */
|
/** 데이터 설정 */
|
||||||
const newRoofList = currentRoofList.map((roof, idx) => {
|
const newRoofList = currentRoofList.map((roof, idx) => {
|
||||||
return { ...roof, index: idx, ...basicInfo, raft: roof.raft ? roof.raft : roof.raftBaseCd }
|
return { ...roof, index: idx, ...basicInfo, raft: roof.raft ? roof.raft : roof.raftBaseCd }
|
||||||
|
|||||||
@ -1576,7 +1576,7 @@ export const usePolygon = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
roofLines.forEach((line) => {
|
roofLines.forEach((line) => {
|
||||||
//console.log("::::::::::",line);
|
console.log("::::::::::",line);
|
||||||
roof.lines.forEach((roofLine) => {
|
roof.lines.forEach((roofLine) => {
|
||||||
if (
|
if (
|
||||||
(isSamePoint(line.startPoint, roofLine.startPoint) && isSamePoint(line.endPoint, roofLine.endPoint)) ||
|
(isSamePoint(line.startPoint, roofLine.startPoint) && isSamePoint(line.endPoint, roofLine.endPoint)) ||
|
||||||
@ -1953,16 +1953,7 @@ export const usePolygon = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
polygon.lines.forEach((line, index) => {
|
polygon.lines.forEach((line) => {
|
||||||
//text 와 planSize 및 actualSize가 안맞는 문제
|
|
||||||
const nextText = polygon?.texts?.[index]?.text
|
|
||||||
const nextPlaneSize = Number(nextText)
|
|
||||||
if (nextText != null && nextText !== '' && Number.isFinite(nextPlaneSize) ) {
|
|
||||||
if(line.attributes.actualSize !== nextPlaneSize && line.attributes.planeSize !== nextPlaneSize) {
|
|
||||||
line.attributes.planeSize = nextPlaneSize
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
setActualSize(line, polygon.direction, +polygon.roofMaterial?.pitch)
|
setActualSize(line, polygon.direction, +polygon.roofMaterial?.pitch)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user