From d69d509893016320bb4a38b429efaf386069b4fa Mon Sep 17 00:00:00 2001 From: kjs Date: Mon, 19 Jan 2026 15:52:59 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A6=AC=ED=94=BC=ED=84=B0=20=EC=BB=A8?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=84=88=20=EB=93=9C=EB=A1=AD=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EB=A1=9C=EC=A7=81=20=EA=B0=9C=EC=84=A0:=20ScreenDe?= =?UTF-8?q?signer=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EC=97=90=EC=84=9C?= =?UTF-8?q?=20=EB=A6=AC=ED=94=BC=ED=84=B0=20=EC=BB=A8=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=84=88=EC=9D=98=20=EB=93=9C=EB=A1=AD=20=EC=9D=B4=EB=B2=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=B2=98=EB=A6=AC=20=EC=8B=9C,=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=ED=95=98=EB=8A=94=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=ED=83=80=EC=9E=85=EC=9D=84=20"repeat-container"?= =?UTF-8?q?=EC=99=80=20"v2-repeat-container"=EB=A1=9C=20=ED=99=95=EC=9E=A5?= =?UTF-8?q?=ED=95=98=EC=98=80=EC=8A=B5=EB=8B=88=EB=8B=A4.=20=EB=98=90?= =?UTF-8?q?=ED=95=9C,=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=B6=9C=EB=A0=A5=EC=9D=84=20=EC=A0=9C=EA=B1=B0?= =?UTF-8?q?=ED=95=98=EC=97=AC=20=EC=BD=94=EB=93=9C=EC=9D=98=20=EA=B0=80?= =?UTF-8?q?=EB=8F=85=EC=84=B1=EC=9D=84=20=ED=96=A5=EC=83=81=EC=8B=9C?= =?UTF-8?q?=EC=BC=B0=EC=8A=B5=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components/screen/ScreenDesigner.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/frontend/components/screen/ScreenDesigner.tsx b/frontend/components/screen/ScreenDesigner.tsx index eb92a005..96e07e69 100644 --- a/frontend/components/screen/ScreenDesigner.tsx +++ b/frontend/components/screen/ScreenDesigner.tsx @@ -2229,11 +2229,11 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD if (repeatContainer) { const containerId = repeatContainer.getAttribute("data-component-id"); if (containerId) { - console.log("리피터 컨테이너 내부 드롭 감지:", { containerId, component }); - // 해당 리피터 컨테이너 찾기 const targetComponent = layout.components.find((c) => c.id === containerId); - if (targetComponent && (targetComponent as any).componentType === "repeat-container") { + const compType = (targetComponent as any)?.componentType; + // v2-repeat-container 또는 repeat-container 모두 지원 + if (targetComponent && (compType === "repeat-container" || compType === "v2-repeat-container")) { const currentConfig = (targetComponent as any).componentConfig || {}; const currentChildren = currentConfig.children || []; @@ -2266,7 +2266,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD setLayout(newLayout); saveToHistory(newLayout); - console.log("리피터 컨테이너에 컴포넌트 추가 완료:", newChild); return; // 리피터 컨테이너 처리 완료 } } @@ -2617,10 +2616,9 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD if (repeatContainer && type === "column" && column) { const containerId = repeatContainer.getAttribute("data-component-id"); if (containerId) { - console.log("리피터 컨테이너 내부에 컬럼 드롭:", { containerId, column }); - const targetComponent = layout.components.find((c) => c.id === containerId); - if (targetComponent && (targetComponent as any).componentType === "repeat-container") { + const rcType = (targetComponent as any)?.componentType; + if (targetComponent && (rcType === "repeat-container" || rcType === "v2-repeat-container")) { const currentConfig = (targetComponent as any).componentConfig || {}; const currentChildren = currentConfig.children || []; @@ -2652,7 +2650,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD setLayout(newLayout); saveToHistory(newLayout); - console.log("리피터 컨테이너에 컬럼 기반 컴포넌트 추가 완료:", newChild); return; } } @@ -4786,7 +4783,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD onDropCapture={(e) => { // 캡처 단계에서 드롭 이벤트를 처리하여 자식 요소 드롭도 감지 e.preventDefault(); - console.log("🎯 캔버스 드롭 이벤트 (캡처), target:", (e.target as HTMLElement).tagName, (e.target as HTMLElement).getAttribute("data-repeat-container")); handleDrop(e); }} >