feature/v2-unified-renewal #379
|
|
@ -2229,11 +2229,11 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
|
||||||
if (repeatContainer) {
|
if (repeatContainer) {
|
||||||
const containerId = repeatContainer.getAttribute("data-component-id");
|
const containerId = repeatContainer.getAttribute("data-component-id");
|
||||||
if (containerId) {
|
if (containerId) {
|
||||||
console.log("리피터 컨테이너 내부 드롭 감지:", { containerId, component });
|
|
||||||
|
|
||||||
// 해당 리피터 컨테이너 찾기
|
// 해당 리피터 컨테이너 찾기
|
||||||
const targetComponent = layout.components.find((c) => c.id === containerId);
|
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 currentConfig = (targetComponent as any).componentConfig || {};
|
||||||
const currentChildren = currentConfig.children || [];
|
const currentChildren = currentConfig.children || [];
|
||||||
|
|
||||||
|
|
@ -2266,7 +2266,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
|
||||||
|
|
||||||
setLayout(newLayout);
|
setLayout(newLayout);
|
||||||
saveToHistory(newLayout);
|
saveToHistory(newLayout);
|
||||||
console.log("리피터 컨테이너에 컴포넌트 추가 완료:", newChild);
|
|
||||||
return; // 리피터 컨테이너 처리 완료
|
return; // 리피터 컨테이너 처리 완료
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2617,10 +2616,9 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
|
||||||
if (repeatContainer && type === "column" && column) {
|
if (repeatContainer && type === "column" && column) {
|
||||||
const containerId = repeatContainer.getAttribute("data-component-id");
|
const containerId = repeatContainer.getAttribute("data-component-id");
|
||||||
if (containerId) {
|
if (containerId) {
|
||||||
console.log("리피터 컨테이너 내부에 컬럼 드롭:", { containerId, column });
|
|
||||||
|
|
||||||
const targetComponent = layout.components.find((c) => c.id === containerId);
|
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 currentConfig = (targetComponent as any).componentConfig || {};
|
||||||
const currentChildren = currentConfig.children || [];
|
const currentChildren = currentConfig.children || [];
|
||||||
|
|
||||||
|
|
@ -2652,7 +2650,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
|
||||||
|
|
||||||
setLayout(newLayout);
|
setLayout(newLayout);
|
||||||
saveToHistory(newLayout);
|
saveToHistory(newLayout);
|
||||||
console.log("리피터 컨테이너에 컬럼 기반 컴포넌트 추가 완료:", newChild);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4786,7 +4783,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
|
||||||
onDropCapture={(e) => {
|
onDropCapture={(e) => {
|
||||||
// 캡처 단계에서 드롭 이벤트를 처리하여 자식 요소 드롭도 감지
|
// 캡처 단계에서 드롭 이벤트를 처리하여 자식 요소 드롭도 감지
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
console.log("🎯 캔버스 드롭 이벤트 (캡처), target:", (e.target as HTMLElement).tagName, (e.target as HTMLElement).getAttribute("data-repeat-container"));
|
|
||||||
handleDrop(e);
|
handleDrop(e);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue