aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D
diff options
context:
space:
mode:
authorJose Antonio Marquez Russo2012-02-24 15:44:57 -0800
committerJose Antonio Marquez Russo2012-02-24 15:44:57 -0800
commit97c0efb645b1e0488112c1b7bfd7fa4864eae3dc (patch)
treeae6c6587af2ab5ec34f86ac05d342ecf8ebfc0c7 /js/helper-classes/3D
parentc916a2a5fec0c96bd1c6f56af82543da9b69c33c (diff)
parentb056b4bef5982466d80d72e5cbb31e63087990e1 (diff)
downloadninja-97c0efb645b1e0488112c1b7bfd7fa4864eae3dc.tar.gz
Merge pull request #19 from ananyasen/FileIO
FileIO branch pull request
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index c07391db..85870097 100755
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -115,6 +115,26 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
115 } 115 }
116 }, 116 },
117 117
118 initializeFromDocument:{
119 value:function(){
120 var documentRootChildren = null, i;
121 //initialize with current document
122 this._eltArray = [];
123 this._planesArray = [];
124 this.setDrawingSurfaceElement(this.application.ninja.stage.canvas);
125 this.setSourceSpaceElement( this.application.ninja.stage.stageDeps.currentStage );
126 this.setWorkingPlane( Vector.create( [0,0,1,0] ) );
127
128 //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 documentRootChildren = this.application.ninja.currentDocument._liveNodeList;
131 for(i=0;i<documentRootChildren.length;i++){
132 this.addElement(documentRootChildren[i]);
133 }
134 }
135 }
136 },
137
118 handleElementAdded: { 138 handleElementAdded: {
119 value: function(event) { 139 value: function(event) {
120 this.addElement(event.detail); 140 this.addElement(event.detail);