Skip to content

Commit ca23d95

Browse files
committed
added support for going back/forward (getNext(i)+getPrev(i)) by an amount
1 parent 86cc304 commit ca23d95

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ var ylist = new Y.List()
5050
* .ref(position)
5151
* Retrieve a reference to the element on a *position*.
5252
* You can call `ref.getNext()` and `ref.getPrev()` to get the next/previous reference
53+
* You can call `ref.getNext(i)` and `ref.getPrev(i)` to get the i-th next/previous reference
5354
* You can call `ref.val()` to get the element, to which the reference points (`y.ref(1).val() === y.val(1)`)
5455
* .observe(f)
5556
* The observer is called whenever something on this list changed. (throws insert, and delete events)

build/test/list-test.js

Lines changed: 32 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)