fix 2 typos in SplitPanel
This commit is contained in:
parent
4372676f1f
commit
2666b13ec1
1 changed files with 4 additions and 4 deletions
|
@ -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?
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue