50% 원복

This commit is contained in:
hyojun.choi 2025-07-02 11:00:35 +09:00
parent 422a331d90
commit f24715b5d4

View File

@ -123,9 +123,10 @@ export default function CircuitTrestleSetting({ id }) {
// //
const beforeCapture = () => { const beforeCapture = () => {
setCanvasZoom(100) // setCanvasZoom(100)
canvas.set({ zoom: 1 }) const x = canvas.width / 2
canvas.viewportTransform = [1, 0, 0, 1, 0, 0] const y = canvas.height / 2
canvas.zoomToPoint(new fabric.Point(x, y), 0.5)
changeFontSize('lengthText', '28') changeFontSize('lengthText', '28')
changeFontSize('circuitNumber', '28') changeFontSize('circuitNumber', '28')
changeFontSize('flowText', '28') changeFontSize('flowText', '28')
@ -134,6 +135,9 @@ export default function CircuitTrestleSetting({ id }) {
// //
const afterCapture = () => { const afterCapture = () => {
setCanvasZoom(100)
canvas.set({ zoom: 1 })
canvas.viewportTransform = [1, 0, 0, 1, 0, 0]
changeFontSize('lengthText', lengthText.fontSize.value) changeFontSize('lengthText', lengthText.fontSize.value)
changeFontSize('circuitNumber', circuitNumberText.fontSize.value) changeFontSize('circuitNumber', circuitNumberText.fontSize.value)
changeFontSize('flowText', flowText.fontSize.value) changeFontSize('flowText', flowText.fontSize.value)