aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/draw-utils.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-05-24 11:38:51 -0700
committerJose Antonio Marquez2012-05-24 11:38:51 -0700
commite64328dc08418730ca580d33381cb2001c7a96fd (patch)
tree74e3996696adfea94158c29575e9393e56169930 /js/helper-classes/3D/draw-utils.js
parentd57cd68741f340a45be780675ed79b5caf2094e9 (diff)
parenta8eb5c65a21af3bf8d8b8eb3e65b494b8bd9bc01 (diff)
downloadninja-e64328dc08418730ca580d33381cb2001c7a96fd.tar.gz
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Conflicts: js/document/document-html.js js/helper-classes/3D/view-utils.js js/stage/stage.reel/stage.js
Diffstat (limited to 'js/helper-classes/3D/draw-utils.js')
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index 9de85216..871b832d 100755
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -119,7 +119,10 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
119 119
120 initializeFromDocument:{ 120 initializeFromDocument:{
121 value:function(){ 121 value:function(){
122 var documentRootChildren = null, i, stage = this.application.ninja.stage; 122 var i,
123 documentRootChildren = this.application.ninja.currentDocument.model.views.design.getLiveNodeList(true),
124 stage = this.application.ninja.stage,
125 len = documentRootChildren.length;
123 //initialize with current document 126 //initialize with current document
124 this._eltArray = []; 127 this._eltArray = [];
125 this._planesArray = []; 128 this._planesArray = [];
@@ -128,11 +131,11 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
128 this.setWorkingPlane( [0,0,1,0] ); 131 this.setWorkingPlane( [0,0,1,0] );
129 132
130 //Loop through all the top-level children of the current document and call drawUtils.addElement on them 133 //Loop through all the top-level children of the current document and call drawUtils.addElement on them
131 if(this.application.ninja.currentDocument._liveNodeList.length > 0){ 134 if(len > 0) {
132 documentRootChildren = this.application.ninja.currentDocument._liveNodeList; 135 var initL = 0,
133 var len = documentRootChildren.length, 136 initT = 0,
134 minLeft = stage.userPaddingLeft, 137 minLeft = 0,
135 minTop = stage.userPaddingTop, 138 minTop = 0,
136 docLeft = stage.documentOffsetLeft, 139 docLeft = stage.documentOffsetLeft,
137 docTop = stage.documentOffsetTop, 140 docTop = stage.documentOffsetTop,
138 l, 141 l,
@@ -151,10 +154,10 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
151 minTop = t; 154 minTop = t;
152 } 155 }
153 } 156 }
154 if(minLeft !== stage.userPaddingLeft) { 157 if(minLeft !== initL) {
155 stage.userPaddingLeft = minLeft; 158 stage.userPaddingLeft = minLeft;
156 } 159 }
157 if(minTop !== stage.userPaddingTop) { 160 if(minTop !== initT) {
158 stage.userPaddingTop = minTop; 161 stage.userPaddingTop = minTop;
159 } 162 }
160 } 163 }