Merge branch 'dev' into feature/dev-yj

This commit is contained in:
yjnoh 2025-05-30 13:06:17 +09:00
commit 8be2e3e232

View File

@ -13,7 +13,7 @@ import { useRecoilState } from 'recoil'
import { makersState, modelsState, modelState, pcsCheckState, selectedMakerState, selectedModelsState, seriesState } from '@/store/circuitTrestleAtom'
import { POLYGON_TYPE } from '@/common/common'
import { useSwal } from '@/hooks/useSwal'
import { canvasState } from '@/store/canvasAtom'
import { canvasState, canvasZoomState } from '@/store/canvasAtom'
import { useTrestle } from '@/hooks/module/useTrestle'
import { selectedModuleState } from '@/store/selectedModuleOptions'
@ -37,7 +37,7 @@ export default function CircuitTrestleSetting({ id }) {
const { swalFire } = useSwal()
const { saveEstimate } = useEstimate()
const canvas = useRecoilValue(canvasState)
const [canvasZoom, setCanvasZoom] = useRecoilState(canvasZoomState)
const [tabNum, setTabNum] = useState(1)
const [allocationType, setAllocationType] = useState(ALLOCATION_TYPE.AUTO)
const [circuitAllocationType, setCircuitAllocationType] = useState(1)
@ -102,6 +102,13 @@ export default function CircuitTrestleSetting({ id }) {
}
}, [])
const handleZoomClear = () => {
setCanvasZoom(100)
canvas.set({ zoom: 1 })
canvas.viewportTransform = [1, 0, 0, 1, 0, 0]
canvas.renderAll()
}
//
// PCS
@ -343,6 +350,7 @@ export default function CircuitTrestleSetting({ id }) {
// ()
const onApply = async () => {
handleZoomClear()
setAllModuleSurfaceIsComplete(false)
setIsGlobalLoading(true)