diff --git a/source/Ox.UI/js/Bar/Bar.js b/source/Ox.UI/js/Bar/Bar.js index cba10a19..1af93baf 100644 --- a/source/Ox.UI/js/Bar/Bar.js +++ b/source/Ox.UI/js/Bar/Bar.js @@ -8,18 +8,21 @@ Ox.Bar Bar ([options[, self]]) -> 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; + };