@@ 791-801 (lines=11) @@ | ||
788 | } |
|
789 | return null; |
|
790 | }, |
|
791 | prev: function(obj, wrap = false){ |
|
792 | var list = this; |
|
793 | if (list == null) { |
|
794 | return null; |
|
795 | } |
|
796 | var i = list.indexOf(obj); |
|
797 | if (i > 0) { |
|
798 | return (wrap && i <= 0) ? list[list.length - 1] : list[i - 1]; |
|
799 | } |
|
800 | return null; |
|
801 | }, |
|
802 | ||
803 | ||
804 | /** Returns the nearest existing slot value in the array. Returns `ifNoSlots` if the array is empty. */ |
|
@@ 780-790 (lines=11) @@ | ||
777 | return list[list.length - 1] == value; |
|
778 | }, |
|
779 | ||
780 | next: function(obj, wrap = false){ |
|
781 | var list = this; |
|
782 | if (list == null) { |
|
783 | return null; |
|
784 | } |
|
785 | var i = list.indexOf(obj); |
|
786 | if (i > -1) { |
|
787 | return (wrap && i >= (list.length - 1)) ? list[0] : list[i + 1]; |
|
788 | } |
|
789 | return null; |
|
790 | }, |
|
791 | prev: function(obj, wrap = false){ |
|
792 | var list = this; |
|
793 | if (list == null) { |