Resortable - v2.1.5
    Preparing search index...

    Interface CreateGhostOptions

    Options accepted by GhostManager.createGhost and GhostManager.createStackedGhost.

    Promoted from a positional fallbackClass?: string parameter (PR1 #29) to an options bag when fallbackOnBody and fallbackOffset{X,Y} joined the fallback option family in PR2 #29. Future additions (e.g. fallbackTolerance pre-commit motion in PR3) should slot in here.

    interface CreateGhostOptions {
        fallbackClass?: string;
        appendTo?: HTMLElement;
        offsetX?: number;
        offsetY?: number;
        dataIdAttr?: string;
        cursorOrigin?: { x: number; y: number };
    }
    Index

    Properties

    fallbackClass?: string

    Class added to the ghost element alongside ghostClass so fallback-mode styles can target a stable hook (legacy parity for forceFallback).

    appendTo?: HTMLElement

    Parent element the ghost is appended to. Defaults to document.body, matching the legacy fallbackOnBody: true behaviour. Callers wanting the legacy fallbackOnBody: false semantics should pass the sortable zone's root element instead.

    Note: when the chosen parent has overflow: hidden, the ghost will be clipped at the zone boundary. This is the legacy behaviour, not a bug.

    offsetX?: number

    Horizontal pixel offset applied to the ghost relative to the cursor. Positive values shift the ghost to the right of where it would otherwise sit; negative values shift it to the left. Matches legacy fallbackOffset.x direction (see legacy-sortable/src/Sortable.js _onTouchMove).

    offsetY?: number

    Vertical pixel offset applied to the ghost relative to the cursor. Positive values shift the ghost down; negative values shift it up. Matches legacy fallbackOffset.y direction.

    dataIdAttr?: string

    The data-attribute name configured by dataIdAttr on the parent Sortable. When the ghost lives inside the sortable zone (legacy fallbackOnBody: false, the new PR2 default), it would otherwise share this attribute with the original element — yielding duplicate matches in DOM queries like [data-id="foo"]. The attribute is stripped from the ghost clone so identity queries continue to address only the real item.

    cursorOrigin?: { x: number; y: number }

    Cursor position to anchor the grab-point offset to, when it differs from the triggering event's position. With fallbackTolerance > 0 the drag commits only after the pointer has already traveled several pixels — anchoring to the commit event would shift the ghost by that traveled distance. Pass the pointerdown position instead.