From 800b9ac17cfe0f1de3f05c4d4f680e213cbaeb66 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 18 Dec 2012 11:45:20 +0100 Subject: [PATCH] Ox.List: add public 'selectPosition' method --- source/Ox.UI/js/List/List.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index a68d13bf..81bc21b8 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -1647,16 +1647,25 @@ Ox.List = function(options, self) { /*@ scrollToSelection scroll list to current selection - () -> returns List Element + () -> List Object @*/ that.scrollToSelection = function() { self.selected.length && scrollToPosition(self.selected[0]); return that; }; + /*@ + selectPosition select position + (pos) -> List Object + @*/ + that.selectPosition = function(pos) { + select(pos); + return that; + }; + /*@ size fixme: not a good function name - () -> returns List Element + () -> List Object @*/ that.size = function() { // fixme: not a good function name if (self.options.orientation == 'both') {