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