Linked-list based implementation of a view-sequence which fixes several issues in the stock famo.us ViewSequence.
- LinkedListViewSequence
- LinkedListViewSequence ⏏
- new LinkedListViewSequence(options)
- .getHead() ⇒
LinkedListViewSequence
- .getTail() ⇒
LinkedListViewSequence
- .getPrevious() ⇒
LinkedListViewSequence
- .getNext() ⇒
LinkedListViewSequence
- .get() ⇒
Renderable
- .set(value) ⇒
LinkedListViewSequence
- .getIndex() ⇒
Number
- .toString() ⇒
String
- .indexOf(item) ⇒
Number
- .findByIndex(index) ⇒
LinkedListViewSequence
- .findByValue(value) ⇒
LinkedListViewSequence
- .insert(index, renderNode) ⇒
LinkedListViewSequence
- .remove(sequence) ⇒
LinkedListViewSequence
- .getLength() ⇒
Number
- .clear() ⇒
LinkedListViewSequence
- .unshift(renderNode) ⇒
LinkedListViewSequence
- .push(renderNode) ⇒
LinkedListViewSequence
- .swap(index, index2) ⇒
LinkedListViewSequence
- LinkedListViewSequence ⏏
Param | Type | Description |
---|---|---|
options | Object |
Configurable options. |
Get head node.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- head node.
Get tail node.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- tail node.
Get previous node.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- previous node.
Get next node.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- next node.
Gets the value of this node.
Kind: instance method of LinkedListViewSequence
Returns: Renderable
- surface/view
Sets the value of this node.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- this
Param | Type | Description |
---|---|---|
value | Renderable |
surface/view |
Get the index of the node.
Kind: instance method of LinkedListViewSequence
Returns: Number
- Index of node.
Get human readable string verion of the node.
Kind: instance method of LinkedListViewSequence
Returns: String
- node as a human readable string
Finds the index of a given render-node.
Kind: instance method of LinkedListViewSequence
Returns: Number
- Index or -1 when not found.
Param | Type | Description |
---|---|---|
item | Renderable |
Render-node to find. |
Finds the view-sequence item at the given index.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- View-sequence node or undefined.
Param | Type | Description |
---|---|---|
index | Number |
0-based index. |
Finds the view-sequence node by the given renderable.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- View-sequence node or undefined.
Param | Type | Description |
---|---|---|
value | Renderable |
Render-node to search for. |
Inserts an item into the view-sequence.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- newly inserted view-sequence node.
Param | Type | Description |
---|---|---|
index | Number |
0-based index (-1 inserts at the tail). |
renderNode | Renderable |
Renderable to insert. |
Removes the view-sequence item at the given index.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- New current view-sequence node to display.
Param | Type | Description |
---|---|---|
sequence | LinkedListViewSequence |
Node to remove |
Gets the number of items in the view-sequence.
Kind: instance method of LinkedListViewSequence
Returns: Number
- length.
Removes all items.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- Last remaining view-sequence node.
Inserts an item at the beginning of the view-sequence.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- newly inserted view-sequence node.
Param | Type | Description |
---|---|---|
renderNode | Renderable |
Renderable to insert. |
Inserts an item at the end of the view-sequence.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- newly inserted view-sequence node.
Param | Type | Description |
---|---|---|
renderNode | Renderable |
Renderable to insert. |
Swaps the values of two view-sequence nodes.
Kind: instance method of LinkedListViewSequence
Returns: LinkedListViewSequence
- this
Param | Type | Description |
---|---|---|
index | Number |
Index of the first item to swap. |
index2 | Number |
Index of item to swap with. |