jimp-test

This commit is contained in:
hyojun.choi 2025-06-05 17:46:10 +09:00
parent b6a2334fb8
commit 22deb24fa2

View File

@ -103,8 +103,8 @@ export default function CircuitTrestleSetting({ id }) {
} }
}, []) }, [])
// 50% // 50%
const handleZoomClear = () => { const handleZoomCompression = () => {
// setCanvasZoom(100) // setCanvasZoom(100)
const x = canvas.width / 2 const x = canvas.width / 2
const y = canvas.height / 2 const y = canvas.height / 2
@ -112,6 +112,13 @@ export default function CircuitTrestleSetting({ id }) {
canvas.renderAll() canvas.renderAll()
} }
const handleZoomClear = () => {
setCanvasZoom(100)
canvas.set({ zoom: 1 })
canvas.viewportTransform = [1, 0, 0, 1, 0, 0]
canvas.renderAll()
}
// //
// PCS // PCS
@ -353,7 +360,7 @@ export default function CircuitTrestleSetting({ id }) {
// () // ()
const onApply = async () => { const onApply = async () => {
handleZoomClear() handleZoomCompression()
setAllModuleSurfaceIsComplete(false) setAllModuleSurfaceIsComplete(false)
setIsGlobalLoading(true) setIsGlobalLoading(true)
@ -385,6 +392,7 @@ export default function CircuitTrestleSetting({ id }) {
if (result) { if (result) {
handleCanvasToPng(2) handleCanvasToPng(2)
handleZoomClear()
// //
await saveEstimate(result) await saveEstimate(result)
} else { } else {