Map from HTML parent elements to JQuery children nodes, in their original order. This is used to save the original element ordering.
Map from HTML elements to their original indices. This is used to move non-reorderable elements back to their original position.
HTML class of items or groups whose nodes must not be reordered.
Such elements are flagged accordingly when they are created (see Item.canBeReordered and ItemGroup.canBeReordered).
Return the HTML class to add to elements which have been reordered.
This method should be overriden by any child class willing to distinguish the elements it can reorder by their class.
The class to add to reordered elements.
Return the type of adaptive elements (as returned by AdaptiveElement.getType) which are being reordered.
The type of adaptive elements which are being reordered.
Sort and return the indices of all the child nodes of the given parent node which can be reordered, i.e. which have a matching adaptive element type (according to Reorder.getReorderedElementType).
The parent node containing reorderable child nodes whose indices must be sorted.
A sorted list of child node indices.
Reinsert the given node at the given index (in its own parent).
The node to reinsert.
The new index of the node.
Move the given node at the given index (in its own parent), and add a class to the node to mark it as reordered.
The node to move.
The new index of the node.
Move all non-reorderable elements back to their original indices.
Reorder all given elements in the given order.
Non-given elements may be moved to a higher index if need be, except for elements marked as non-reorderable.
This method expects a complete list of menu adaptive elements, supposedly computed by a policy. It was designed to be called by implementations of AdaptationStyle.apply.
The sorted list of elements to reorder.
Save the original indices of all child nodes of the given parent node which have the Reorder.NON_REORDERABLE_ELEMENT_CLASS class.
The parent node with possibly non-reorderable children.
Save the original order of all children of all the nodes of the given adaptive elements.
The order is saved by saving an array of references to all the children(as jQuery nodes) in their original orders.
The adaptive elements whose children order must be saved.
Compute and return a map from each unique parent element (of all given nodes) to an array of all their children.
The original order of the children is conserved in the arrays.
The nodes to split by their parents.
A map from parent elements to arrays of child nodes.
Generated using TypeDoc
Create a new instance of Reorder.