눈금자(Ruler) 표시 기능 구현

This commit is contained in:
dohyeons
2025-10-01 16:27:05 +09:00
parent a1ddf4678d
commit d01ade4e4f
4 changed files with 244 additions and 54 deletions

View File

@@ -356,6 +356,10 @@ interface ReportDesignerContextType {
toggleLock: () => void;
lockComponents: () => void;
unlockComponents: () => void;
// 눈금자 표시
showRuler: boolean;
setShowRuler: (show: boolean) => void;
}
const ReportDesignerContext = createContext<ReportDesignerContextType | undefined>(undefined);
@@ -377,6 +381,9 @@ export function ReportDesignerProvider({ reportId, children }: { reportId: strin
const [showGrid, setShowGrid] = useState(true); // Grid 표시 여부
const [snapToGrid, setSnapToGrid] = useState(true); // Grid Snap 활성화
// 눈금자 표시
const [showRuler, setShowRuler] = useState(true);
// 정렬 가이드라인
const [alignmentGuides, setAlignmentGuides] = useState<{
vertical: number[];
@@ -1340,6 +1347,9 @@ export function ReportDesignerProvider({ reportId, children }: { reportId: strin
toggleLock,
lockComponents,
unlockComponents,
// 눈금자 표시
showRuler,
setShowRuler,
};
return <ReportDesignerContext.Provider value={value}>{children}</ReportDesignerContext.Provider>;