TaskDrag
Feature
This feature allows cards on the TaskBoard to be dragged across swimlanes and columns but also vertically in the same column to change the order:
When a task is dropped, its columnField, swimlaneField and/or weight fields are updated to reflect the new location.
Note that when moving a task to a catch-all column (a column with id *), the task's field will be set to null.
Drag events
The different stages of a drag operation trigger different events, in order of appearance:
| Event | Description |
|---|---|
| beforeTaskDrag | Preventable event fired before a drag starts |
| taskDragStart | Fired when dragging starts |
| taskDrag | Fired when movement during a drag will lead to changes |
| beforeTaskDrop | Preventable event fired before finalizing a valid drop. Allows async listeners |
| taskDrop | Fired after finalizing a valid drop |
| taskDragAbort | Fired when a drag is aborted (ESC, drop out of bounds or by a listener) |
| taskDragEnd | Fired when a started drag ends, no matter the outcome |
The beforeTaskDrop is useful for example to request user confirmation for a drop:
This feature is enabled by default.
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
The number of milliseconds that must elapse after a
touchstartevent before it is considered a drag. If movement occurs before this time, the drag is aborted. This is to allow touch swipes and scroll gestures.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of TaskDrag class, or subclass thereof.
-
Returns true if a drag operation is active
-
Identifies an object as an instance of TaskDrag class, or subclass thereof.