Resortable - v2.1.5
    Preparing search index...

    Class DropZoneInternal

    Manages sortable container and basic DOM operations

    Index

    Constructors

    Properties

    element: HTMLElement

    Accessors

    • get isAnimating(): boolean

      Whether FLIP animations are currently in progress

      Returns boolean

    Methods

    • Set the selector for draggable items

      Parameters

      • selector: string

      Returns void

    • Get sortable items (only elements matching the draggable selector). The placeholder and the ghost are clones of a real item, so they match the selector — both are marked with data attributes and excluded here, otherwise index math counts phantom items (the ghost lives inside the zone element when fallbackOnBody is false).

      Returns HTMLElement[]

    • Controlled-mode view of the list: draggable items excluding the placeholder (already filtered by getItems), items hidden for the active controlled drag, and any explicitly excluded elements (the dragged items — the HTML5 pipeline leaves them visible in place).

      Parameters

      • exclude: HTMLElement[] = []

      Returns HTMLElement[]

    • Controlled-mode drop index: the index the dragged item(s) will occupy in this list AFTER the consumer commits the move — i.e. the count of visible draggable siblings (see getVisibleItems) before placeholder.

      Parameters

      • placeholder: HTMLElement
      • exclude: HTMLElement[] = []

      Returns number

    • Get index of an item within container

      Parameters

      • item: HTMLElement

      Returns number

    • Insert node before ref (append when null), FLIP-animating the displaced items. Controlled mode uses this to move the placeholder.

      Parameters

      • node: HTMLElement
      • ref: null | Node

      Returns void

    • Move item to new index within container (among sortable items only)

      Parameters

      • item: HTMLElement
      • toIndex: number

      Returns void

    • Move multiple items to a target index, preserving their relative order

      Parameters

      • items: HTMLElement[]
      • toIndex: number

      Returns void