Compare commits

..

No commits in common. "5ace2335837d39f8f910de71c93955692f469953" and "2dfdd700f7b92811fd2aea10e54391c7833d2861" have entirely different histories.

2 changed files with 4 additions and 15 deletions

View File

@ -16,7 +16,7 @@ import { globalLocaleStore } from '@/store/localeAtom'
import { getChonByDegree, getDegreeByChon } from '@/util/canvas-util'
import { usePolygon } from '@/hooks/usePolygon'
import { canvasState, canvasSettingState, currentCanvasPlanState, currentMenuState } from '@/store/canvasAtom'
import { canvasState, canvasSettingState, currentMenuState } from '@/store/canvasAtom'
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
import { MENU, POLYGON_TYPE } from '@/common/common'
import { useRoofFn } from '@/hooks/common/useRoofFn'
@ -52,7 +52,6 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
const { setSurfaceShapePattern } = useRoofFn()
const canvas = useRecoilValue(canvasState)
const [canvasSetting, setCanvasSetting] = useRecoilState(canvasSettingState)
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
const roofDisplay = useRecoilValue(roofDisplaySelector)
const { setPolygonLinesActualSize } = usePolygon()
@ -124,15 +123,6 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
if (openPoint && openPoint === 'canvasMenus') fetchBasicSettings(planNo, openPoint)
}, [])
/**
* 현재 활성 플랜이 변경될 currentRoof.planNo 업데이트
*/
useEffect(() => {
if (currentCanvasPlan?.planNo && currentRoof) {
setCurrentRoof(prev => ({ ...prev, planNo: currentCanvasPlan.planNo }))
}
}, [currentCanvasPlan?.planNo])
/**
* 배치면초기설정 데이터 조회 화면 오픈
*/
@ -142,7 +132,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
setRaftCodes(raftCodeList)
setCurrentRoof({
...addedRoofs[0],
planNo: currentCanvasPlan?.planNo || planNo,
planNo: planNo,
roofSizeSet: String(basicSetting.roofSizeSet),
roofAngleSet: basicSetting.roofAngleSet,
})
@ -231,7 +221,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
const handleSaveBtn = async () => {
const roofInfo = {
...currentRoof,
planNo: currentCanvasPlan?.planNo || basicSetting.planNo,
planNo: basicSetting.planNo,
roofCd: roofRef.roofCd.current?.value,
width: roofRef.width.current?.value,
length: roofRef.length.current?.value,
@ -254,7 +244,6 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
*/
basicSettingSave({
...basicSetting,
planNo: currentCanvasPlan?.planNo || basicSetting.planNo,
/**
* 선택된 지붕재 정보
*/

View File

@ -1059,7 +1059,7 @@ export function useModule() {
}
const isOutsideSurface = (module, moduleSetupSurface) => {
return !checkModuleDisjointSurface(polygonToTurfPolygon(module, true), polygonToTurfPolygon(moduleSetupSurface, true), 0.5)
return !checkModuleDisjointSurface(polygonToTurfPolygon(module, true), polygonToTurfPolygon(moduleSetupSurface, true))
}
const getRowModules = (target) => {