aboutsummaryrefslogtreecommitdiff
path: root/js/panels/PanelContainer/PanelContainer.reel
diff options
context:
space:
mode:
authorEric Guzman2012-02-29 16:13:19 -0800
committerEric Guzman2012-02-29 16:13:19 -0800
commit53bdb1e7773069c4cca59e88d6da91cd0f58c94a (patch)
tree44a2147fcbb43ea483f78a1e2e082919f9c81970 /js/panels/PanelContainer/PanelContainer.reel
parentb2c60efb9c6f5dfa7b0fc5c2b9feebebc805ed97 (diff)
parentb09956e4a9a35c5588cc7cd1f01efb617cbe0884 (diff)
downloadninja-53bdb1e7773069c4cca59e88d6da91cd0f58c94a.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
Conflicts: js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
Diffstat (limited to 'js/panels/PanelContainer/PanelContainer.reel')
-rwxr-xr-xjs/panels/PanelContainer/PanelContainer.reel/PanelContainer.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
index db0f494b..003724bb 100755
--- a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
+++ b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
@@ -16,7 +16,6 @@ var ComponentsPanel = require("js/panels/Components/ComponentsPanel").Components
16var ProjectPanel = require("js/panels/Project/ProjectPanel").ProjectPanel; 16var ProjectPanel = require("js/panels/Project/ProjectPanel").ProjectPanel;
17var MaterialsPanel = require("js/panels/Materials/MaterialsPanel").MaterialsPanel; 17var MaterialsPanel = require("js/panels/Materials/MaterialsPanel").MaterialsPanel;
18var PresetsPanel = require("js/panels/presets/presets-panel").PresetsPanel; 18var PresetsPanel = require("js/panels/presets/presets-panel").PresetsPanel;
19var CSSPanelNew = require("js/panels/css-panel/css-panel-container").CSSPanelContainer;
20 19
21exports.PanelContainer = Montage.create(Component, { 20exports.PanelContainer = Montage.create(Component, {
22 lastOffset: { 21 lastOffset: {
@@ -46,7 +45,7 @@ exports.PanelContainer = Montage.create(Component, {
46 }, 45 },
47 46
48 initPanelOrder: { 47 initPanelOrder: {
49 value: ['CSSPanelNew','PropertiesPanel','ColorPanel','ComponentsPanel','ProjectPanel','CSSPanel','MaterialsPanel','PresetsPanel'] 48 value: ['ColorPanel', 'PropertiesPanel','ComponentsPanel','ProjectPanel','CSSPanel','MaterialsPanel','PresetsPanel']
50 }, 49 },
51 50
52 panelOrder: { 51 panelOrder: {
@@ -64,14 +63,19 @@ exports.PanelContainer = Montage.create(Component, {
64 value: function() { 63 value: function() {
65 //Panels Loading 64 //Panels Loading
66 this.lastOffset = this.element.offsetHeight; 65 this.lastOffset = this.element.offsetHeight;
66
67 /* Old Settings
67 if( this.application.ninja.settings.getSetting(this.element.id, "panelOrder") != null) { 68 if( this.application.ninja.settings.getSetting(this.element.id, "panelOrder") != null) {
68 this.initPanelOrder = this.application.ninja.settings.getSetting(this.element.id, "panelOrder") 69 this.initPanelOrder = this.application.ninja.settings.getSetting(this.element.id, "panelOrder")
69 } 70 }
71 */
72
70 // if Panels already loaded no need to load again. 73 // if Panels already loaded no need to load again.
71 for(var i = 0; i < this.initPanelOrder.length; i++) { 74 for(var i = 0; i < this.initPanelOrder.length; i++) {
72 this.addPanel(eval(this.initPanelOrder[i])); 75 this.addPanel(eval(this.initPanelOrder[i]));
73 this.panelOrder.push(this.initPanelOrder[i]); 76 this.panelOrder.push(this.initPanelOrder[i]);
74 this.application.ninja.settings.setSetting(this.element.id, "panelOrder", this.panelOrder); 77
78// this.application.ninja.settings.setSetting(this.element.id, "panelOrder", this.panelOrder);
75 } 79 }
76 80
77 var hideSplitter = true; 81 var hideSplitter = true;
@@ -102,7 +106,6 @@ exports.PanelContainer = Montage.create(Component, {
102 this.addEventListener("change@appModel.CSSPanel", this, false); 106 this.addEventListener("change@appModel.CSSPanel", this, false);
103 this.addEventListener("change@appModel.MaterialsPanel", this, false); 107 this.addEventListener("change@appModel.MaterialsPanel", this, false);
104 this.addEventListener("change@appModel.PresetsPanel", this, false); 108 this.addEventListener("change@appModel.PresetsPanel", this, false);
105 this.addEventListener("change@appModel.CSSPanelNew", this, false);
106 } 109 }
107 }, 110 },
108 111
@@ -223,7 +226,7 @@ exports.PanelContainer = Montage.create(Component, {
223 } 226 }
224 minHeights -= this._panels[lastPanel].minHeight - this._collapsedHeight; 227 minHeights -= this._panels[lastPanel].minHeight - this._collapsedHeight;
225 this._panels[lastPanel].collapsed = true; 228 this._panels[lastPanel].collapsed = true;
226 this.repeater.childComponents[lastPanel].needsDraw = true; 229 //this.repeater.childComponents[lastPanel].needsDraw = true;
227 230
228 231
229 } 232 }
@@ -331,7 +334,8 @@ exports.PanelContainer = Montage.create(Component, {
331 this._panels.splice(overed,0, panelRemoved[0]); 334 this._panels.splice(overed,0, panelRemoved[0]);
332 var panelOrderRemoved = this.panelOrder.splice(selected,1); 335 var panelOrderRemoved = this.panelOrder.splice(selected,1);
333 this.panelOrder.splice(overed,0, panelOrderRemoved[0]); 336 this.panelOrder.splice(overed,0, panelOrderRemoved[0]);
334 this.application.ninja.settings.setSetting(this.element.id, "panelOrder", this.panelOrder); 337
338 //this.application.ninja.settings.setSetting(this.element.id, "panelOrder", this.panelOrder);
335 } 339 }
336 } 340 }
337 }, 341 },