UNPKG

@gorpacrate/core-graphics

Version:

A core library for creating shape-based graphic editors

13 lines (12 loc) 682 B
import { IScene } from '../../declarations'; import { IHistoryEvent } from '../../history/history-event'; import { IEditorAction } from '../editor-action'; import { IEditorEvent } from '../editor-events'; import { IEditorState } from '../editor-state'; import { EditorChangeShapesOrderEvent } from '../events/shapes'; export declare function getShapesChangeOrderHistoryEvent(shapesOrder: string[], ev: EditorChangeShapesOrderEvent): IEditorAction; export declare function getMoveShapesEvent(scene: IScene, ids: string[], dp: { dx: number; dy: number; }): IHistoryEvent; export default function shapesStateReducer(currentState: IEditorState, ev: IEditorEvent): IEditorState;