diff options
Diffstat (limited to 'js/panels/PanelContainer.reel/PanelContainer.js')
-rwxr-xr-x | js/panels/PanelContainer.reel/PanelContainer.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index 8d1d6a5e..044fd598 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js | |||
@@ -21,6 +21,18 @@ exports.PanelContainer = Montage.create(Component, { | |||
21 | value: [] | 21 | value: [] |
22 | }, | 22 | }, |
23 | 23 | ||
24 | panelsAvailable: { | ||
25 | value: function() { | ||
26 | var pAvail = []; | ||
27 | this.panels.forEach(function(obj) { | ||
28 | if (window.getComputedStyle(obj.element).display !== "none") { | ||
29 | pAvail.push(obj); | ||
30 | } | ||
31 | }); | ||
32 | return pAvail; | ||
33 | } | ||
34 | }, | ||
35 | |||
24 | currentPanelState: { | 36 | currentPanelState: { |
25 | value: {} | 37 | value: {} |
26 | }, | 38 | }, |
@@ -49,6 +61,8 @@ exports.PanelContainer = Montage.create(Component, { | |||
49 | this['panel_'+i].modulePath = p.modulePath; | 61 | this['panel_'+i].modulePath = p.modulePath; |
50 | this['panel_'+i].moduleName = p.moduleName; | 62 | this['panel_'+i].moduleName = p.moduleName; |
51 | this['panel_'+i].disabled = true; | 63 | this['panel_'+i].disabled = true; |
64 | this['panel_'+i].groups = p.groups; | ||
65 | |||
52 | 66 | ||
53 | this.currentPanelState[p.name] = {}; | 67 | this.currentPanelState[p.name] = {}; |
54 | this.currentPanelState.version = "1.0"; | 68 | this.currentPanelState.version = "1.0"; |
@@ -144,6 +158,7 @@ exports.PanelContainer = Montage.create(Component, { | |||
144 | 158 | ||
145 | _setPanelsSizes: { | 159 | _setPanelsSizes: { |
146 | value: function(panelActivated) { | 160 | value: function(panelActivated) { |
161 | this.panelsAvailable(); | ||
147 | var len = this.panels.length, setLocked = true; | 162 | var len = this.panels.length, setLocked = true; |
148 | 163 | ||
149 | for(var i = 0; i < len; i++) { | 164 | for(var i = 0; i < len; i++) { |
@@ -160,6 +175,7 @@ exports.PanelContainer = Montage.create(Component, { | |||
160 | _redrawPanels: { | 175 | _redrawPanels: { |
161 | value: function(panelActivated, unlockPanels) { | 176 | value: function(panelActivated, unlockPanels) { |
162 | var maxHeight = this.element.offsetHeight, setLocked = true; | 177 | var maxHeight = this.element.offsetHeight, setLocked = true; |
178 | var availablePanels = this.panelsAvailable(); | ||
163 | var len = this.panels.length; | 179 | var len = this.panels.length; |
164 | 180 | ||
165 | if(unlockPanels === true) { | 181 | if(unlockPanels === true) { |