DragAndDrop

What an element does in drag and drop: it can be dragged when it has data, and things are dropped on it when accepts accepts their data. While something is dragged its source is :dragging, and the drop target under the pointer that accepts it is :drag-over; a ghost with label follows the pointer.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var accepts: (Any) -> Boolean?

true when the element accepts drops of the data, null when it accepts none

Link copied to clipboard
var data: () -> Any??

the data the element is dragged with, null when it can not be dragged

Link copied to clipboard
val dropped: Event<DragEvent>

something is dropped on the element

Link copied to clipboard
val ended: Event<DragEvent>

a drag of the element ended, dropped or not

Link copied to clipboard
val entered: Event<DragEvent>

something that the element accepts is dragged onto it

Link copied to clipboard
var label: () -> String?

the text of the ghost that follows the pointer, the label or text of the element when null

Link copied to clipboard
val left: Event<DragEvent>

something is dragged off the element

Link copied to clipboard
val over: Event<DragEvent>

something that the element accepts moves over it

Functions

Link copied to clipboard
open override fun close()