aboutsummaryrefslogtreecommitdiff
path: root/js/panels/PanelContainer.reel/PanelContainer.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/PanelContainer.reel/PanelContainer.js')
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js29
1 files changed, 18 insertions, 11 deletions
diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js
index 8d1d6a5e..dc501a99 100755
--- a/js/panels/PanelContainer.reel/PanelContainer.js
+++ b/js/panels/PanelContainer.reel/PanelContainer.js
@@ -16,7 +16,24 @@ exports.PanelContainer = Montage.create(Component, {
16 value: null 16 value: null
17 }, 17 },
18 18
19 // This will hold the current loaded panels. 19 _currentDocument: {
20 value : null,
21 enumerable : false
22 },
23
24 currentDocument : {
25 get : function() {
26 return this._currentDocument;
27 },
28 set : function(value) {
29 if (value === this._currentDocument) {
30 return;
31 }
32
33 this._currentDocument = value;
34 }
35 },
36
20 panels: { 37 panels: {
21 value: [] 38 value: []
22 }, 39 },
@@ -65,8 +82,6 @@ exports.PanelContainer = Montage.create(Component, {
65 82
66 this.application.localStorage.setItem("panels", this.currentPanelState); 83 this.application.localStorage.setItem("panels", this.currentPanelState);
67 84
68
69 this.eventManager.addEventListener( "onOpenDocument", this, false);
70 this.eventManager.addEventListener( "closeDocument", this, false); 85 this.eventManager.addEventListener( "closeDocument", this, false);
71 } 86 }
72 }, 87 },
@@ -89,14 +104,6 @@ exports.PanelContainer = Montage.create(Component, {
89 } 104 }
90 }, 105 },
91 106
92 handleOnOpenDocument: {
93 value: function(){
94 this.panels.forEach(function(obj) {
95 obj.disabled = false;
96 });
97 }
98 },
99
100 handleCloseDocument: { 107 handleCloseDocument: {
101 value: function(){ 108 value: function(){
102 if(!this.application.ninja.documentController.activeDocument) { 109 if(!this.application.ninja.documentController.activeDocument) {