diff --git a/source/Ox.UI/js/Panel/SplitPanel.js b/source/Ox.UI/js/Panel/SplitPanel.js index aed4db3b..b0057376 100644 --- a/source/Ox.UI/js/Panel/SplitPanel.js +++ b/source/Ox.UI/js/Panel/SplitPanel.js @@ -97,7 +97,8 @@ Ox.SplitPanel = function(options, self) { self.options.elements.forEach(function(element, i) { element.collapsed && that.css( - self.edges[i == 0 ? 0 : 1], -self.options.elements[i].size + 'px' + // left/right (horizontal) or top/bottom (vertical) + self.edges[i == 0 ? 0 : 1], -element.size + 'px' ); }); @@ -121,7 +122,7 @@ Ox.SplitPanel = function(options, self) { function getVisibleSize(index) { var element = self.options.elements[index]; - return getSize(element) * !element.collapsed; + return getSize(index) * !element.collapsed; } function setSizes(init, animate) { @@ -162,8 +163,7 @@ Ox.SplitPanel = function(options, self) { } else { // left (horizontal) or top (vertical) if (element.size == 'auto') { - css[self.edges[0]] = getVisibleSize(self.options.elements[0]) - + getSize(1) + 'px'; + css[self.edges[0]] = getVisibleSize(0) + getSize(1) + 'px'; } else { css[self.edges[0]] = 'auto'; // fixme: why is this needed? }