aboutsummaryrefslogtreecommitdiff
path: root/js/panels/PanelContainer.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/PanelContainer.reel')
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js15
1 files changed, 8 insertions, 7 deletions
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, {
158 158
159 _setPanelsSizes: { 159 _setPanelsSizes: {
160 value: function(panelActivated) { 160 value: function(panelActivated) {
161 this.panelsAvailable(); 161 var availablePanels = this.panelsAvailable();
162 var len = this.panels.length, setLocked = true; 162 var len = availablePanels.length;
163 var setLocked = true;
163 164
164 for(var i = 0; i < len; i++) { 165 for(var i = 0; i < len; i++) {
165 if(this.panels[i] === panelActivated || panelActivated === null) { 166 if(availablePanels[i] === panelActivated || panelActivated === null) {
166 setLocked = false; 167 setLocked = false;
167 } 168 }
168 169
169 this.panels[i].locked = setLocked; 170 availablePanels[i].locked = setLocked;
170 this.panels[i].needsDraw = true; 171 availablePanels[i].needsDraw = true;
171 } 172 }
172 } 173 }
173 }, 174 },
@@ -176,7 +177,7 @@ exports.PanelContainer = Montage.create(Component, {
176 value: function(panelActivated, unlockPanels) { 177 value: function(panelActivated, unlockPanels) {
177 var maxHeight = this.element.offsetHeight, setLocked = true; 178 var maxHeight = this.element.offsetHeight, setLocked = true;
178 var availablePanels = this.panelsAvailable(); 179 var availablePanels = this.panelsAvailable();
179 var len = this.panels.length; 180 var len = availablePanels.length;
180 181
181 if(unlockPanels === true) { 182 if(unlockPanels === true) {
182 setLocked = false; 183 setLocked = false;
@@ -190,7 +191,7 @@ exports.PanelContainer = Montage.create(Component, {
190 } 191 }
191 192
192 for(var i = 0; i < len; i++) { 193 for(var i = 0; i < len; i++) {
193 var obj = this['panel_'+i]; 194 var obj = availablePanels[i];
194 195
195 if(obj === panelActivated) { 196 if(obj === panelActivated) {
196 setLocked = false; 197 setLocked = false;