Mixin: DraggableGroupElement

.ui.mixin.DraggableGroupElement

DraggableGroupElement is a mixin class used to create a group element to contain draggable elements, which are items that can be clicked and dragged by a mouse. The class is used with OO.ui.mixin.DraggableElement.
Mixes In:
Source:

Methods

getDragItem() → {OO.ui.mixin.DraggableElement|null}

Get the item that is currently being dragged.
Source:
Returns:
The currently dragged item, or `null` if no item is being dragged
Type
OO.ui.mixin.DraggableElement | null

isDraggable() → {boolean}

Check the draggable state of this widget
Source:
Returns:
Widget supports draggable operations
Type
boolean

reorder(item, newIndex)

Reorder the items in the group
Parameters:
Name Type Description
item OO.ui.mixin.DraggableElement Reordered item
newIndex number New index
Source:

setDragItem(item)

Set a dragged item
Parameters:
Name Type Description
item OO.ui.mixin.DraggableElement Dragged item
Source:

toggleDraggable(isDraggable)

Change the draggable state of this widget. This allows users to temporarily halt the dragging operations.
Parameters:
Name Type Description
isDraggable boolean Widget supports draggable operations
Source:
Fires:

unsetDragItem()

Unset the current dragged item
Source:

updateIndexes()

Update the index properties of the items
Source: