forked from 0x2620/oxjs
self.setOption ~> that.update
This commit is contained in:
parent
9ee0742b53
commit
005d50c389
56 changed files with 919 additions and 933 deletions
|
|
@ -49,7 +49,19 @@ Ox.IconList = function(options, self) {
|
|||
sort: [],
|
||||
unique: ''
|
||||
})
|
||||
.options(options || {});
|
||||
.options(options || {})
|
||||
.update({
|
||||
items: function() {
|
||||
that.$element.options('items', self.options.items);
|
||||
},
|
||||
selected: function() {
|
||||
that.$element.options('selected', self.options.selected);
|
||||
},
|
||||
sort: function() {
|
||||
updateKeys();
|
||||
that.$element.options('sort', self.options.sort);
|
||||
}
|
||||
});
|
||||
|
||||
if (self.options.fixedRatio) {
|
||||
self.options.defaultRatio = self.options.fixedRatio;
|
||||
|
|
@ -127,21 +139,6 @@ Ox.IconList = function(options, self) {
|
|||
});
|
||||
}
|
||||
|
||||
/*@
|
||||
setOption <f> set key/value
|
||||
(key, value) -> <u> set key in options to value
|
||||
@*/
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'items') {
|
||||
that.$element.options(key, value);
|
||||
} else if (key == 'selected') {
|
||||
that.$element.options(key, value);
|
||||
} else if (key == 'sort') {
|
||||
updateKeys();
|
||||
that.$element.options(key, value);
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
closePreview <f> close preview
|
||||
() -> <o> the list
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue