UNPKG

@gorpacrate/core-graphics

Version:

A core library for creating shape-based graphic editors

12 lines (11 loc) 488 B
import { IEditorInputEvent } from '../editor-state/editor-events'; import { IEditorGridState } from '../editor-state/editor-state'; export declare function snapCoordToGrid(size: number, x: number): number; export declare function snapCoordsIfNeeded(gridState: IEditorGridState, coords: { x: number; y: number; }): { x: number; y: number; }; export declare function snapEditorInputEventCoordsIfNeeded(gridState: IEditorGridState, ev: IEditorInputEvent): IEditorInputEvent;