Ox.List: add public 'selectPosition' method
This commit is contained in:
parent
293c96a97d
commit
800b9ac17c
1 changed files with 11 additions and 2 deletions
|
@ -1647,16 +1647,25 @@ Ox.List = function(options, self) {
|
|||
|
||||
/*@
|
||||
scrollToSelection <f> scroll list to current selection
|
||||
() -> <f> returns List Element
|
||||
() -> <o> List Object
|
||||
@*/
|
||||
that.scrollToSelection = function() {
|
||||
self.selected.length && scrollToPosition(self.selected[0]);
|
||||
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
|
||||
() -> <f> returns List Element
|
||||
() -> <o> List Object
|
||||
@*/
|
||||
that.size = function() { // fixme: not a good function name
|
||||
if (self.options.orientation == 'both') {
|
||||
|
|
Loading…
Reference in a new issue