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
|
([options[, self]]) -> <o:Ox.Element> Bar object
|
||||||
@*/
|
@*/
|
||||||
Ox.Bar = function(options, self) {
|
Ox.Bar = function(options, self) {
|
||||||
|
|
||||||
self = self || {};
|
self = self || {};
|
||||||
var that = Ox.Element({}, self)
|
var that = Ox.Element({}, self)
|
||||||
.defaults({
|
.defaults({
|
||||||
orientation: 'horizontal',
|
orientation: 'horizontal',
|
||||||
size: 'medium'
|
size: 16
|
||||||
})
|
})
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.addClass('OxBar Ox' + Ox.toTitleCase(self.options.orientation)),
|
.addClass('OxBar Ox' + Ox.toTitleCase(self.options.orientation));
|
||||||
dimensions = Ox.UI.DIMENSIONS[self.options.orientation];
|
|
||||||
self.options.size = Ox.isString(self.options.size)
|
self.dimensions = Ox.UI.DIMENSIONS[self.options.orientation];
|
||||||
? Ox.UI.getBarSize(self.options.size) : self.options.size;
|
|
||||||
that.css(dimensions[0], '100%')
|
that.css(self.dimensions[0], '100%')
|
||||||
.css(dimensions[1], self.options.size + 'px');
|
.css(self.dimensions[1], self.options.size + 'px');
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue