From 2666b13ec14bd71a63ade5623ec773c7a56f3b40 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 17 Jan 2014 11:17:27 +0000 Subject: [PATCH] fix 2 typos in SplitPanel --- source/Ox.UI/js/Panel/SplitPanel.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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? }