diff --git a/frontend/components/screen/ScreenDesigner.tsx b/frontend/components/screen/ScreenDesigner.tsx index 4d644524..bb62f17e 100644 --- a/frontend/components/screen/ScreenDesigner.tsx +++ b/frontend/components/screen/ScreenDesigner.tsx @@ -24,19 +24,26 @@ import { calculateRelativePositions, restoreAbsolutePositions, } from "@/lib/utils/groupingUtils"; -import { - calculateGridInfo, - snapToGrid, - snapSizeToGrid, - generateGridLines, - updateSizeFromGridColumns, - adjustGridColumnsFromSize, - alignGroupChildrenToGrid, - calculateOptimalGroupSize, - normalizeGroupChildPositions, - calculateWidthFromColumns, - GridSettings as GridUtilSettings, -} from "@/lib/utils/gridUtils"; + +// 10px 단위 스냅 함수 +const snapTo10px = (value: number): number => { + return Math.round(value / 10) * 10; +}; + +const snapPositionTo10px = (position: Position): Position => { + return { + x: snapTo10px(position.x), + y: snapTo10px(position.y), + z: position.z, + }; +}; + +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 { screenApi, tableTypeApi } from "@/lib/api/screen"; import { tableManagementApi } from "@/lib/api/tableManagement"; @@ -57,7 +64,6 @@ import { TemplatesPanel, TemplateComponent } from "./panels/TemplatesPanel"; import { ComponentsPanel } from "./panels/ComponentsPanel"; import PropertiesPanel from "./panels/PropertiesPanel"; import DetailSettingsPanel from "./panels/DetailSettingsPanel"; -import GridPanel from "./panels/GridPanel"; import ResolutionPanel from "./panels/ResolutionPanel"; import { usePanelState, PanelConfig } from "@/hooks/usePanelState"; import { FlowButtonGroup } from "./widgets/FlowButtonGroup";