UNPKG

react-easy-diagram

Version:

<img src="https://github.com/tokarchyn/react-easy-diagram/blob/main/repo/logo-with-name.png?raw=true" alt="React Easy Diagram logo" height="50">

22 lines 832 B
import { Callbacks, SelectionState } from "../index"; import { NodeState } from "./nodeState"; import { Point } from "../utils/point"; /** * Encapsulate logic for dragging mechanism. Right now only nodes are supposed to be dragged. */ export declare class DragState { private _nodesBeingDragged; private _remaindersFromDrags; private _selectionState; private _callbacks; constructor(selectionState: SelectionState, callbacks: Callbacks); get isActive(): boolean; startDragging: (nodeToDrag: NodeState) => boolean; /** * Drag by a difference between previous coordinate and current * @param delta vector to drag by which takes into account diagram zoom */ dragBy: (delta: Point) => void; stopDragging: () => void; } //# sourceMappingURL=dragState.d.ts.map