aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/draw-utils.js
diff options
context:
space:
mode:
authorEric Guzman2012-03-12 15:33:04 -0700
committerEric Guzman2012-03-12 15:33:04 -0700
commit7e3161153b87b891875ac65368a19aed12909fa3 (patch)
treeb80f48d711a9729fc39dbbdff28c4f0620e7302d /js/helper-classes/3D/draw-utils.js
parent7a28932ba8a7517bbaaabe1f5edf678416aafc9c (diff)
parent69d90467865a1384725b2301901be2180c5a841f (diff)
downloadninja-7e3161153b87b891875ac65368a19aed12909fa3.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
Conflicts: js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
Diffstat (limited to 'js/helper-classes/3D/draw-utils.js')
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index 85870097..63e7799a 100755
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -112,6 +112,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
112 this.eventManager.addEventListener("elementDeleted", this, false); 112 this.eventManager.addEventListener("elementDeleted", this, false);
113 this.eventManager.addEventListener("deleteSelection", this, false); 113 this.eventManager.addEventListener("deleteSelection", this, false);
114 this.eventManager.addEventListener("elementChange", this, false); 114 this.eventManager.addEventListener("elementChange", this, false);
115 this.eventManager.addEventListener("closeDocument", this, false);
115 } 116 }
116 }, 117 },
117 118
@@ -123,7 +124,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
123 this._planesArray = []; 124 this._planesArray = [];
124 this.setDrawingSurfaceElement(this.application.ninja.stage.canvas); 125 this.setDrawingSurfaceElement(this.application.ninja.stage.canvas);
125 this.setSourceSpaceElement( this.application.ninja.stage.stageDeps.currentStage ); 126 this.setSourceSpaceElement( this.application.ninja.stage.stageDeps.currentStage );
126 this.setWorkingPlane( Vector.create( [0,0,1,0] ) ); 127 this.setWorkingPlane( [0,0,1,0] );
127 128
128 //Loop through all the top-level children of the current document and call drawUtils.addElement on them 129 //Loop through all the top-level children of the current document and call drawUtils.addElement on them
129 if(this.application.ninja.currentDocument._liveNodeList.length > 0){ 130 if(this.application.ninja.currentDocument._liveNodeList.length > 0){
@@ -135,6 +136,15 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
135 } 136 }
136 }, 137 },
137 138
139 handleCloseDocument:{
140 value: function() {
141 if(this.application.ninja.documentController._documents.length === 0){
142 this._eltArray = [];
143 this._planesArray = [];
144 }
145 }
146 },
147
138 handleElementAdded: { 148 handleElementAdded: {
139 value: function(event) { 149 value: function(event) {
140 this.addElement(event.detail); 150 this.addElement(event.detail);