그룹이 보이지 않던 문제 수정

This commit is contained in:
kjs
2025-09-02 10:33:41 +09:00
parent 174acfacb7
commit 1bf28291b5
7 changed files with 223 additions and 37 deletions

View File

@@ -22,9 +22,9 @@ export function createGroupComponent(
return {
id: generateComponentId(),
type: "group",
position,
position: { ...position, z: position.z || 1 }, // z 값 포함
size: { width: groupWidth, height: groupHeight },
label: title, // title 대신 label 사용
title: title, // GroupComponent 타입에 맞게 title 사용
backgroundColor: "#f8f9fa",
border: "1px solid #dee2e6",
borderRadius: 8,
@@ -78,6 +78,7 @@ export function calculateRelativePositions(
position: {
x: component.position.x - groupPosition.x,
y: component.position.y - groupPosition.y,
z: component.position.z || 1, // z 값 유지
},
parentId: groupId, // 그룹 ID를 부모로 설정
}));
@@ -90,6 +91,7 @@ export function restoreAbsolutePositions(components: ComponentData[], groupPosit
position: {
x: component.position.x + groupPosition.x,
y: component.position.y + groupPosition.y,
z: component.position.z || 1, // z 값 유지
},
parentId: undefined,
}));