Skip to main content

Overview

The DragDropManager is the core class that orchestrates all drag-and-drop operations. It manages the lifecycle of drag operations, coordinates sensors and plugins, and maintains a registry of draggable and droppable elements.

Constructor

Parameters

Input
Configuration options for the manager

Default Preset

The manager automatically includes a default preset of sensors and plugins:
Additional plugins are always included:
  • ScrollListener - Tracks scroll events
  • Scroller - Manages scrolling logic
  • StyleInjector - Injects plugin styles

Usage

Basic Setup

Custom Configuration

Disable Default Preset

Properties

dragOperation

Access the current drag operation state.

registry

Access registered entities, plugins, and sensors.

monitor

Event monitor for drag lifecycle events.

actions

Internal actions used by sensors:

Events

Listen to drag-and-drop events using the monitor:

dragstart

DragStartEvent

dragmove

DragMoveEvent

dragover

DragOverEvent

dragend

DragEndEvent

collision

Fired when collision detection runs.

beforedragstart

Fired before the drag operation is fully initialized.

Example: Complete Setup

Type Definitions