Ox.Bar: get rid of Ox.UI.getBarSize
This commit is contained in:
parent
6a5c380795
commit
10415a6ae2
1 changed files with 10 additions and 7 deletions
|
@ -8,18 +8,21 @@ Ox.Bar <f> Bar
|
|||
([options[, self]]) -> <o:Ox.Element> Bar object
|
||||
@*/
|
||||
Ox.Bar = function(options, self) {
|
||||
|
||||
self = self || {};
|
||||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
orientation: 'horizontal',
|
||||
size: 'medium'
|
||||
size: 16
|
||||
})
|
||||
.options(options || {})
|
||||
.addClass('OxBar Ox' + Ox.toTitleCase(self.options.orientation)),
|
||||
dimensions = Ox.UI.DIMENSIONS[self.options.orientation];
|
||||
self.options.size = Ox.isString(self.options.size)
|
||||
? Ox.UI.getBarSize(self.options.size) : self.options.size;
|
||||
that.css(dimensions[0], '100%')
|
||||
.css(dimensions[1], self.options.size + 'px');
|
||||
.addClass('OxBar Ox' + Ox.toTitleCase(self.options.orientation));
|
||||
|
||||
self.dimensions = Ox.UI.DIMENSIONS[self.options.orientation];
|
||||
|
||||
that.css(self.dimensions[0], '100%')
|
||||
.css(self.dimensions[1], self.options.size + 'px');
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue