@arcmantle/library
    Preparing search index...

    Interface DragOptions

    interface DragOptions {
        initialEvent: PointerEvent;
        onMove: (options: { event: PointerEvent; x: number; y: number }) => void;
        onStop: (options: { event: PointerEvent; x: number; y: number }) => void;
        passive: boolean;
    }
    Index

    Properties

    initialEvent: PointerEvent

    When an initial event is passed, the first drag will be triggered immediately using the coordinates therein. This is useful when the drag is initiated by a mousedown/touchstart event but you want the initial "click" to activate a drag (e.g. positioning a handle initially at the click target).

    onMove: (options: { event: PointerEvent; x: number; y: number }) => void

    Callback that runs as dragging occurs.

    onStop: (options: { event: PointerEvent; x: number; y: number }) => void

    Callback that runs when dragging stops.

    passive: boolean