x4js - v2.2.49
    Preparing search index...

    Class DragManager

    Manages drag and drop operations within the application. This class handles the registration of draggable elements and drop targets, and orchestrates the visual feedback and event dispatching during drag operations.

    Index
    dragGhost: HTMLElement
    dragSource: Component
    dropTarget: Component
    notified: Component
    timer: any
    • Registers a component as a draggable element. This sets up DOM event listeners for dragstart, drag, and dragend to manage the drag operation, including creating a drag ghost and applying CSS classes.

      Parameters

      • el: Component

        The component to make draggable.

      Returns void

    • Registers a component as a drop target. This sets up DOM event listeners for dragenter, dragover, dragleave, and drop. It uses a DropCallback to notify the component about drag events and an optional FilterCallback to determine if the target should accept the dragged item.

      Parameters

      • el: Component

        The component to make a drop target.

      • cb: DropCallback

        The callback function to execute on drag events.

      • OptionalfilterCB: FilterCallback

        An optional callback to filter which draggable items can be dropped.

      Returns void