PiDraw API
    Preparing search index...

    Interface IDraggableConfig

    How a point is dragged. The rules apply in this order: along, grid, bounds, then each of follow.

    interface IDraggableConfig {
        along?: "x" | "y";
        bounds?: { x?: Domain; y?: Domain };
        callback?: (point: Point) => void;
        follow?: IDraggableFollow[];
        grid?: boolean;
        target?: Point;
    }
    Index
    along?: "x" | "y"

    Move on the screen along an axis only: the point keeps its other coordinate ('x' keeps its height).

    bounds?: { x?: Domain; y?: Domain }

    The part of each axis the point stays in, in units of the coordinate system.

    callback?: (point: Point) => void

    Called with the point each time it moves, before the other figures are drawn again.

    follow?: IDraggableFollow[]

    Limits that are applied in turn, after the rules above: a function, or a figure the point stays on.

    grid?: boolean

    Put the point on the lines of the grid of the graph, subdivisions included: its step if it shows one, a unit otherwise, from the origin.

    target?: Point

    A point that moves with the one that is dragged, and is the one other figures are built on (the dragged one is a handle).