Constructor
new OO.ui.mixin.DraggableElement([config])abstract
#
DraggableElement is a mixin class used to create elements that can be clicked and dragged by a mouse to a new position within a group. This class must be used in conjunction with OO.ui.mixin.DraggableGroupElement, which provides a container for the draggable elements.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
optional |
Configuration options Properties:
|
- Source:
DraggableElement is a mixin class used to create elements that can be clicked and dragged by a mouse to a new position within a group.
Properties
cancelButtonMouseDownEventsstatic
#
- Source:
Methods
isDraggable() → {boolean}
#
Check the draggable state of this widget.
- Source:
Returns:
Widget supports draggable operations
- Type
- boolean
toggleDraggable([isDraggable])
#
Change the draggable state of this widget. This allows users to temporarily halt the dragging operations.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
isDraggable |
boolean |
optional |
Widget supports draggable operations, omit to toggle |
- Source:
Events
dragend()
#
A dragend event is emitted when the user drags an item and releases the mouse, thus terminating the drag operation.
- Source:
A dragend event is emitted when the user drags an item and releases the mouse, thus terminating the drag operation.
dragstart(item)
#
A dragstart event is emitted when the user clicks and begins dragging an item.
Parameters:
Name | Type | Description |
---|---|---|
item |
OO.ui.mixin.DraggableElement | The item the user has clicked and is dragging with the mouse. |
- Source:
drop()
#
A drop event is emitted when the user drags an item and then releases the mouse button over a valid target.
- Source:
A drop event is emitted when the user drags an item and then releases the mouse button over a valid target.