From 336e0e0ef242f5c472757fe3bbcdd54c04a00f1f Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Mon, 14 May 2012 10:32:59 -0700 Subject: Workspace: has customized Signed-off-by: Armen Kesablyan --- js/panels/PanelContainer.reel/PanelContainer.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'js/panels/PanelContainer.reel/PanelContainer.js') diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index 044fd598..b4f77317 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js @@ -158,16 +158,17 @@ exports.PanelContainer = Montage.create(Component, { _setPanelsSizes: { value: function(panelActivated) { - this.panelsAvailable(); - var len = this.panels.length, setLocked = true; + var availablePanels = this.panelsAvailable(); + var len = availablePanels.length; + var setLocked = true; for(var i = 0; i < len; i++) { - if(this.panels[i] === panelActivated || panelActivated === null) { + if(availablePanels[i] === panelActivated || panelActivated === null) { setLocked = false; } - this.panels[i].locked = setLocked; - this.panels[i].needsDraw = true; + availablePanels[i].locked = setLocked; + availablePanels[i].needsDraw = true; } } }, @@ -176,7 +177,7 @@ exports.PanelContainer = Montage.create(Component, { value: function(panelActivated, unlockPanels) { var maxHeight = this.element.offsetHeight, setLocked = true; var availablePanels = this.panelsAvailable(); - var len = this.panels.length; + var len = availablePanels.length; if(unlockPanels === true) { setLocked = false; @@ -190,7 +191,7 @@ exports.PanelContainer = Montage.create(Component, { } for(var i = 0; i < len; i++) { - var obj = this['panel_'+i]; + var obj = availablePanels[i]; if(obj === panelActivated) { setLocked = false; -- cgit v1.2.3