Resortable - v2.0.0-alpha.1
    Preparing search index...

    Interface MoveEvent

    Move event object passed to onMove callback

    This event provides information about move operations during drag, allowing you to control whether the move should be allowed.

    interface MoveEvent {
        item: HTMLElement;
        to: HTMLElement;
        from: HTMLElement;
        oldIndex?: number;
        newIndex?: number;
        oldDraggableIndex?: number;
        newDraggableIndex?: number;
        clone?: HTMLElement;
        pullMode?: boolean | "clone" | "move";
        items: HTMLElement[];
        related: HTMLElement;
        willInsertAfter?: boolean;
        draggedRect?: DOMRect;
        targetRect?: DOMRect;
        relatedRect?: DOMRect;
    }

    Hierarchy (View Summary)

    Index

    Properties

    item: HTMLElement

    The dragged element

    to: HTMLElement

    The list that the element was dragged to

    from: HTMLElement

    The list that the element was dragged from

    oldIndex?: number

    Old index of the element (before drag)

    May be undefined for add/remove operations

    newIndex?: number

    New index of the element (after drag)

    May be undefined for add/remove operations

    oldDraggableIndex?: number

    Old index among draggable elements only

    Excludes non-draggable items from count

    newDraggableIndex?: number

    New index among draggable elements only

    Excludes non-draggable items from count

    clone?: HTMLElement

    Cloned element (when using group.pull: 'clone')

    Only present in clone operations

    pullMode?: boolean | "clone" | "move"

    Pull mode used for this operation

    • 'clone' when cloning
    • 'move' or true when moving
    • false or undefined for same-list operations
    items: HTMLElement[]

    Array of selected elements (multi-drag mode)

    related: HTMLElement

    Element being dragged over

    willInsertAfter?: boolean

    Whether the move will result in a swap

    draggedRect?: DOMRect

    The target list element

    targetRect?: DOMRect

    The target element's rectangle

    relatedRect?: DOMRect

    The related element's rectangle