diff options
author | Jonathan Duran | 2012-04-19 07:30:06 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-04-19 07:30:06 -0700 |
commit | fa7761eb547372f846a304d775e717a7ef1cbf35 (patch) | |
tree | c60e59702d66cf9b74d5b65ca64918d6e655a2eb /js/helper-classes/3D/draw-utils.js | |
parent | 260bc6db6273258f9a05c21d178273e1c302affb (diff) | |
parent | 9284c19f076dec3b47ece7dc7bcd22d74e4246c3 (diff) | |
download | ninja-fa7761eb547372f846a304d775e717a7ef1cbf35.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Diffstat (limited to 'js/helper-classes/3D/draw-utils.js')
-rwxr-xr-x | js/helper-classes/3D/draw-utils.js | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index a5428ea3..ec8eea0f 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js | |||
@@ -111,6 +111,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
111 | this.eventManager.addEventListener("elementAdded", this, false); | 111 | this.eventManager.addEventListener("elementAdded", this, false); |
112 | this.eventManager.addEventListener("elementsRemoved", this, false); | 112 | this.eventManager.addEventListener("elementsRemoved", this, false); |
113 | this.eventManager.addEventListener("elementChange", this, false); | 113 | this.eventManager.addEventListener("elementChange", this, false); |
114 | this.eventManager.addEventListener("elementChanging", this, false); | ||
114 | this.eventManager.addEventListener("closeDocument", this, false); | 115 | this.eventManager.addEventListener("closeDocument", this, false); |
115 | this.eventManager.addEventListener("elementReplaced", this, false); | 116 | this.eventManager.addEventListener("elementReplaced", this, false); |
116 | } | 117 | } |
@@ -227,20 +228,26 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
227 | // TODO - Check why handleElementChange is being fired before handleAddElement | 228 | // TODO - Check why handleElementChange is being fired before handleAddElement |
228 | handleElementChange: { | 229 | handleElementChange: { |
229 | value: function(event) { | 230 | value: function(event) { |
230 | if(!event.detail || !event.detail.data) | 231 | this._elementChangeHelper(event); |
231 | { | 232 | } |
233 | }, | ||
234 | |||
235 | handleElementChanging: { | ||
236 | value: function(event) { | ||
237 | this._elementChangeHelper(event); | ||
238 | } | ||
239 | }, | ||
240 | |||
241 | _elementChangeHelper: { | ||
242 | value: function(event) { | ||
243 | if(!event.detail || !event.detail.data) { | ||
232 | return; | 244 | return; |
233 | } | 245 | } |
234 | var els = event.detail.data.els; | 246 | var els = event.detail.data.els; |
235 | if(els && this._shouldUpdatePlanes(event.detail.data.prop)) | 247 | if(els && this._shouldUpdatePlanes(event.detail.data.prop)) { |
236 | { | 248 | var len = els.length; |
237 | var len = els.length, | 249 | for(var i=0; i < len; i++) { |
238 | i = 0, | 250 | if(els[i].elementModel.props3D.elementPlane) { |
239 | item; | ||
240 | |||
241 | for(i=0; i < len; i++) { | ||
242 | if(els[i].elementModel.props3D.elementPlane) | ||
243 | { | ||
244 | els[i].elementModel.props3D.elementPlane.init(); | 251 | els[i].elementModel.props3D.elementPlane.init(); |
245 | } | 252 | } |
246 | } | 253 | } |