From 1d26b979ac340f7ee00ca78b15ee3a571cda51cb Mon Sep 17 00:00:00 2001 From: kjs Date: Mon, 10 Nov 2025 15:10:42 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20handleComponentDrop=EC=97=90=EC=84=9C=20?= =?UTF-8?q?gridInfo=20=EC=B0=B8=EC=A1=B0=20=EC=A0=9C=EA=B1=B0=20=EB=B0=8F?= =?UTF-8?q?=2010px=20=EC=8A=A4=EB=83=85=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components/screen/ScreenDesigner.tsx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/frontend/components/screen/ScreenDesigner.tsx b/frontend/components/screen/ScreenDesigner.tsx index 60435ab9..3fdb9f23 100644 --- a/frontend/components/screen/ScreenDesigner.tsx +++ b/frontend/components/screen/ScreenDesigner.tsx @@ -2126,21 +2126,12 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD }); } - // 그리드 시스템이 활성화된 경우 gridColumns에 맞춰 너비 재계산 - if (layout.gridSettings?.snapToGrid && gridInfo) { - // gridColumns에 맞는 정확한 너비 계산 - const calculatedWidth = calculateWidthFromColumns( - gridColumns, - - layout.gridSettings as GridUtilSettings, - ); - - // 컴포넌트별 최소 크기 보장 - const minWidth = isTableList ? 120 : isCardDisplay ? 400 : component.defaultSize.width; - + // 10px 단위로 너비 스냅 + if (layout.gridSettings?.snapToGrid) { componentSize = { ...component.defaultSize, - width: Math.max(calculatedWidth, minWidth), + width: snapTo10px(component.defaultSize.width), + height: snapTo10px(component.defaultSize.height), }; }