Resortable - v3.1.0
    Preparing search index...

    Class DragManagerInternal

    Handles drag and drop interactions with accessibility support

    Implements

    Index
    • Parameters

      • zone: DropZone
      • events: SortableEventSystem
      • groupConfig: string | SortableGroup | undefined
      • Optionaloptions: {
            enableAccessibility?: boolean;
            multiSelect?: boolean;
            multiDragKey?: "ctrl" | "meta" | "shift" | "alt" | null;
            selectedClass?: string;
            focusClass?: string;
            handle?: string;
            filter?: string;
            onFilter?: (event: Event) => void;
            ignore?: string;
            draggable?: string;
            delay?: number;
            delayOnTouchOnly?: number;
            touchStartThreshold?: number;
            swapThreshold?: number;
            invertSwap?: boolean;
            invertedSwapThreshold?: number;
            direction?: "vertical" | "horizontal";
            forceFallback?: boolean;
            nativeDrag?: boolean;
            fallbackClass?: string;
            fallbackOnBody?: boolean;
            fallbackTolerance?: number;
            fallbackOffsetX?: number;
            fallbackOffsetY?: number;
            dragoverBubble?: boolean;
            dropBubble?: boolean;
            removeCloneOnHide?: boolean;
            emptyInsertThreshold?: number;
            hitArea?: string;
            preventOnFilter?: boolean;
            dataIdAttr?: string;
            ghostClass?: string;
            chosenClass?: string;
            dragClass?: string;
            deselectOnClickOutside?: boolean;
            setData?: (dataTransfer: DataTransfer, dragEl: HTMLElement) => void;
            onMove?: (
                event: MoveEvent,
                originalEvent: Event,
            ) => boolean | void | 1 | -1;
            controlled?: boolean;
            sort?: boolean;
            duplicateKey?: "ctrl" | "meta" | "shift" | "alt";
        }

      Returns DragManager

    zone: DropZone
    • Set the cursor shown for the rest of the current drag, or clear it with null.

      Exists because a consumer cannot reach the cursor themselves. On the pointer pipeline the browser draws the cursor from the pointer-capture target — the dragged item — so styling the ghost, the placeholder, or whatever sits under the pointer has no effect; and in controlled mode that capture target is hidden with display: none, which has no layout box and paints no cursor at all. Any inline cursor a consumer wrote there would also be overwritten on the next pointermove by syncDuplicate.

      So the pointer pipeline gets a document-wide !important rule instead, which is immune to all three problems.

      The native pipeline cannot use CSS at all: during a native drag session the browser owns the cursor and reads it from dropEffect. The override is mapped onto that, which supports only four outcomes — copy, move, link (also alias), and none (also no-drop / not-allowed). Any other value is ignored there.

      Parameters

      • cursor: string | null

        A CSS cursor keyword, or null to restore the default.

      Returns void