aboutsummaryrefslogtreecommitdiff
path: root/js/panels/PanelContainer.reel/PanelContainer.js
diff options
context:
space:
mode:
authorJonathan Duran2012-06-05 08:42:53 -0700
committerJonathan Duran2012-06-05 08:42:53 -0700
commitbd2c28100f347afc10243c80b8a288746370eee2 (patch)
treedb507fe0fdbe8e6f98f7d0f022b29c8d5942b4f7 /js/panels/PanelContainer.reel/PanelContainer.js
parent121d0e616f48aa7cd048763554089c20a1883d7a (diff)
parentc1ec69879028220b0c3f11ad6e24035bf527802c (diff)
downloadninja-bd2c28100f347afc10243c80b8a288746370eee2.tar.gz
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts: js/controllers/elements/element-controller.js js/panels/Timeline/Layer.reel/Layer.js js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/PanelContainer.reel/PanelContainer.js')
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js41
1 files changed, 18 insertions, 23 deletions
diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js
index 8d1d6a5e..7cb03255 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 },
@@ -64,10 +81,6 @@ exports.PanelContainer = Montage.create(Component, {
64 } 81 }
65 82
66 this.application.localStorage.setItem("panels", this.currentPanelState); 83 this.application.localStorage.setItem("panels", this.currentPanelState);
67
68
69 this.eventManager.addEventListener( "onOpenDocument", this, false);
70 this.eventManager.addEventListener( "closeDocument", this, false);
71 } 84 }
72 }, 85 },
73 86
@@ -89,24 +102,6 @@ exports.PanelContainer = Montage.create(Component, {
89 } 102 }
90 }, 103 },
91 104
92 handleOnOpenDocument: {
93 value: function(){
94 this.panels.forEach(function(obj) {
95 obj.disabled = false;
96 });
97 }
98 },
99
100 handleCloseDocument: {
101 value: function(){
102 if(!this.application.ninja.documentController.activeDocument) {
103 this.panels.forEach(function(obj) {
104 obj.disabled = true;
105 });
106 }
107 }
108 },
109
110 handleDropped: { 105 handleDropped: {
111 value: function(e) { 106 value: function(e) {
112 var draggedIndex, droppedIndex = 0, len = this.panels.length; 107 var draggedIndex, droppedIndex = 0, len = this.panels.length;