wip: 격자 시스템 제거 시작 - 10px 스냅 함수 추가
This commit is contained in:
parent
c4290f2d0e
commit
554cdbdea5
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Reference in New Issue