Ox.List: add public 'selectPosition' method

This commit is contained in:
rolux 2012-12-18 11:45:20 +01:00
parent 293c96a97d
commit 800b9ac17c

View file

@ -1647,16 +1647,25 @@ Ox.List = function(options, self) {
/*@ /*@
scrollToSelection <f> scroll list to current selection scrollToSelection <f> scroll list to current selection
() -> <f> returns List Element () -> <o> List Object
@*/ @*/
that.scrollToSelection = function() { that.scrollToSelection = function() {
self.selected.length && scrollToPosition(self.selected[0]); self.selected.length && scrollToPosition(self.selected[0]);
return that; return that;
}; };
/*@
selectPosition <f> select position
(pos) -> <o> List Object
@*/
that.selectPosition = function(pos) {
select(pos);
return that;
};
/*@ /*@
size <f> fixme: not a good function name size <f> fixme: not a good function name
() -> <f> returns List Element () -> <o> List Object
@*/ @*/
that.size = function() { // fixme: not a good function name that.size = function() { // fixme: not a good function name
if (self.options.orientation == 'both') { if (self.options.orientation == 'both') {