이력테이블 기준 컬럼 설정 기능
This commit is contained in:
@@ -165,11 +165,6 @@ export function migrateComponentsToColumnSpan(
|
||||
* @returns 새로운 그리드 시스템으로 변환된 레이아웃
|
||||
*/
|
||||
export function migrateLayoutToGridSystem(layout: LayoutData, canvasWidth: number = 1920): LayoutData {
|
||||
console.log("🔄 레이아웃 마이그레이션 시작:", {
|
||||
screenId: layout.screenId,
|
||||
componentCount: layout.components.length,
|
||||
});
|
||||
|
||||
// 1단계: width를 gridColumnSpan으로 변환
|
||||
let migratedComponents = migrateComponentsToColumnSpan(layout.components, canvasWidth);
|
||||
|
||||
@@ -179,11 +174,6 @@ export function migrateLayoutToGridSystem(layout: LayoutData, canvasWidth: numbe
|
||||
// 3단계: 같은 행 내에서 X 좌표로 gridColumnStart 계산
|
||||
migratedComponents = calculateColumnStarts(migratedComponents);
|
||||
|
||||
console.log("✅ 마이그레이션 완료:", {
|
||||
componentCount: migratedComponents.length,
|
||||
sampleComponent: migratedComponents[0],
|
||||
});
|
||||
|
||||
return {
|
||||
...layout,
|
||||
components: migratedComponents,
|
||||
@@ -233,7 +223,6 @@ export function needsMigration(layout: LayoutData): boolean {
|
||||
export function safeMigrateLayout(layout: LayoutData, canvasWidth: number = 1920): LayoutData {
|
||||
try {
|
||||
if (!needsMigration(layout)) {
|
||||
console.log("⏭️ 마이그레이션 불필요 - 이미 최신 형식");
|
||||
return layout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user