Performs a drag-and-drop operation from a source element to a target element. Both source and target elements are identified using selector strategies. Example: dragAndDrop(source: { selector: "#item-to-drag" }, target: { selector: "#drop-zone" }) Returns true if the drag-and-drop was successful.

Definition

dragAndDrop(
  source: ElementOptions!
  target: ElementOptions!
  options: DragAndDropOptions
): Boolean!

Arguments

source: ElementOptions!

Selector options for the source element to drag.

target: ElementOptions!

Selector options for the target element to drop onto.

options: DragAndDropOptions

Options for the drag-and-drop operation, like force or specific positions.

Returns

Boolean!

The Boolean scalar type represents true or false.