Ox.Bar: get rid of Ox.UI.getBarSize

This commit is contained in:
rlx 2014-09-25 12:05:22 +02:00
parent 6a5c380795
commit 10415a6ae2

View file

@ -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;
};