From acc867e38d931a2449c36669142a29ce6ab762e3 Mon Sep 17 00:00:00 2001 From: dohyeons Date: Mon, 22 Dec 2025 11:51:19 +0900 Subject: [PATCH] =?UTF-8?q?QR=EC=BD=94=EB=93=9C=20=EC=A0=95=EC=82=AC?= =?UTF-8?q?=EA=B0=81=ED=98=95=20=EA=B0=95=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/designer/CanvasComponent.tsx | 14 +++++++++++++ .../designer/ReportDesignerRightPanel.tsx | 21 ++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/frontend/components/report/designer/CanvasComponent.tsx b/frontend/components/report/designer/CanvasComponent.tsx index f87ed322..2eefca42 100644 --- a/frontend/components/report/designer/CanvasComponent.tsx +++ b/frontend/components/report/designer/CanvasComponent.tsx @@ -339,6 +339,20 @@ export function CanvasComponent({ component }: CanvasComponentProps) { width: snapValueToGrid(boundedWidth), }); } + } else if (component.type === "barcode" && component.barcodeType === "QR") { + // QR코드는 정사각형 유지: 더 큰 변화량 기준으로 동기화 + const maxDelta = Math.abs(deltaX) > Math.abs(deltaY) ? deltaX : deltaY; + const newSize = Math.max(50, resizeStart.width + maxDelta); + const maxSize = Math.min( + canvasWidthPx - marginRightPx - component.x, + canvasHeightPx - marginBottomPx - component.y, + ); + const boundedSize = Math.min(newSize, maxSize); + const snappedSize = snapValueToGrid(boundedSize); + updateComponent(component.id, { + width: snappedSize, + height: snappedSize, + }); } else { // Grid Snap 적용 updateComponent(component.id, { diff --git a/frontend/components/report/designer/ReportDesignerRightPanel.tsx b/frontend/components/report/designer/ReportDesignerRightPanel.tsx index e648ca8b..635ffd9e 100644 --- a/frontend/components/report/designer/ReportDesignerRightPanel.tsx +++ b/frontend/components/report/designer/ReportDesignerRightPanel.tsx @@ -1649,11 +1649,22 @@ export function ReportDesignerRightPanel() {