wip: 격자 시스템 제거 시작 - 10px 스냅 함수 추가
This commit is contained in:
parent
c4290f2d0e
commit
554cdbdea5
|
|
@ -24,19 +24,26 @@ import {
|
||||||
calculateRelativePositions,
|
calculateRelativePositions,
|
||||||
restoreAbsolutePositions,
|
restoreAbsolutePositions,
|
||||||
} from "@/lib/utils/groupingUtils";
|
} from "@/lib/utils/groupingUtils";
|
||||||
import {
|
|
||||||
calculateGridInfo,
|
// 10px 단위 스냅 함수
|
||||||
snapToGrid,
|
const snapTo10px = (value: number): number => {
|
||||||
snapSizeToGrid,
|
return Math.round(value / 10) * 10;
|
||||||
generateGridLines,
|
};
|
||||||
updateSizeFromGridColumns,
|
|
||||||
adjustGridColumnsFromSize,
|
const snapPositionTo10px = (position: Position): Position => {
|
||||||
alignGroupChildrenToGrid,
|
return {
|
||||||
calculateOptimalGroupSize,
|
x: snapTo10px(position.x),
|
||||||
normalizeGroupChildPositions,
|
y: snapTo10px(position.y),
|
||||||
calculateWidthFromColumns,
|
z: position.z,
|
||||||
GridSettings as GridUtilSettings,
|
};
|
||||||
} from "@/lib/utils/gridUtils";
|
};
|
||||||
|
|
||||||
|
const snapSizeTo10px = (size: { width: number; height: number }): { width: number; height: number } => {
|
||||||
|
return {
|
||||||
|
width: snapTo10px(size.width),
|
||||||
|
height: snapTo10px(size.height),
|
||||||
|
};
|
||||||
|
};
|
||||||
import { GroupingToolbar } from "./GroupingToolbar";
|
import { GroupingToolbar } from "./GroupingToolbar";
|
||||||
import { screenApi, tableTypeApi } from "@/lib/api/screen";
|
import { screenApi, tableTypeApi } from "@/lib/api/screen";
|
||||||
import { tableManagementApi } from "@/lib/api/tableManagement";
|
import { tableManagementApi } from "@/lib/api/tableManagement";
|
||||||
|
|
@ -57,7 +64,6 @@ import { TemplatesPanel, TemplateComponent } from "./panels/TemplatesPanel";
|
||||||
import { ComponentsPanel } from "./panels/ComponentsPanel";
|
import { ComponentsPanel } from "./panels/ComponentsPanel";
|
||||||
import PropertiesPanel from "./panels/PropertiesPanel";
|
import PropertiesPanel from "./panels/PropertiesPanel";
|
||||||
import DetailSettingsPanel from "./panels/DetailSettingsPanel";
|
import DetailSettingsPanel from "./panels/DetailSettingsPanel";
|
||||||
import GridPanel from "./panels/GridPanel";
|
|
||||||
import ResolutionPanel from "./panels/ResolutionPanel";
|
import ResolutionPanel from "./panels/ResolutionPanel";
|
||||||
import { usePanelState, PanelConfig } from "@/hooks/usePanelState";
|
import { usePanelState, PanelConfig } from "@/hooks/usePanelState";
|
||||||
import { FlowButtonGroup } from "./widgets/FlowButtonGroup";
|
import { FlowButtonGroup } from "./widgets/FlowButtonGroup";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue