These docs are for v1.0. Click to read the latest docs for v2.0.

interface-draggableitemscontaineroptions

Interface: DraggableItemsContainerOptions

Options to define the conditions and behavior of draggable items

Hierarchy

  • DraggableItemsContainerOptions

Index

Properties

Properties

dragDirection

Optional dragDirection: undefined | string

Allows to block the device (e.g. a tablet or smartphone) scrolling while the dragging takes place.
This option will have no effect on mouse-enabled devices like a desktop PC.

Possible values: horizontal and vertical
Defaults to horizontal


draggableItemSelector

draggableItemSelector: string

A CSS selector. HTMLElement inside the container matching this selector will be draggable.


getDraggableItemPreview

getDraggableItemPreview: (targetElement: HTMLElement) => { height?: undefined | number ; url: string ; width?: undefined | number }

A callback executed when the user starts dragging.


onCancel

Optional onCancel: undefined | () => void

A callback executed when an item was dragged but not dropped in the board canvas.


onClick

Optional onClick: undefined | (targetElement: HTMLElement) => void

A callback executed when a draggable item is clicked.
This callback will be executed regardless of the item being dragged or not.


onDrop

onDrop: (canvasX: number, canvasY: number, targetElement: HTMLElement) => void

A callback executed when an item was dropped in the board canvas.
targetElement is the dragged and dropped item.