diff options
author | Armen Kesablyan | 2012-06-11 11:17:41 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-11 11:17:41 -0700 |
commit | 278769df00ced8620fd73371e38fe2e43f07ca3b (patch) | |
tree | deb505c8a66b660eee1f17a2c6c4c575c7939f6f /js/document/helpers | |
parent | 555fd6efa605b937800b3979a4c68fa7eb8666ae (diff) | |
parent | 0f040acabfb7a4bf3138debec5aff869487ceb11 (diff) | |
download | ninja-278769df00ced8620fd73371e38fe2e43f07ca3b.tar.gz |
Merge branch 'refs/heads/master' into binding
Conflicts:
js/document/models/html.js
js/document/views/design.js
js/ninja.reel/ninja.js
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/document/helpers')
-rwxr-xr-x | js/document/helpers/webgl-helper.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/js/document/helpers/webgl-helper.js b/js/document/helpers/webgl-helper.js index 84ddc547..6d9ced14 100755 --- a/js/document/helpers/webgl-helper.js +++ b/js/document/helpers/webgl-helper.js | |||
@@ -40,7 +40,7 @@ exports.webGlDocumentHelper = Montage.create(Component, { | |||
40 | if (elt) { | 40 | if (elt) { |
41 | var matLib = MaterialsModel.exportMaterials(); | 41 | var matLib = MaterialsModel.exportMaterials(); |
42 | this._glData = [matLib]; | 42 | this._glData = [matLib]; |
43 | this.collectGLData(elt, this._glData ); | 43 | this.collectGLData(this.iframe.contentWindow.document, this._glData ); |
44 | } else { | 44 | } else { |
45 | this._glData = null | 45 | this._glData = null |
46 | } | 46 | } |
@@ -97,10 +97,6 @@ exports.webGlDocumentHelper = Montage.create(Component, { | |||
97 | // | 97 | // |
98 | if (canvas) { | 98 | if (canvas) { |
99 | // | 99 | // |
100 | if (!canvas.elementModel) { | ||
101 | NJUtils.makeElementModel(canvas, "Canvas", "shape", true); | ||
102 | } | ||
103 | // | ||
104 | if (canvas.elementModel) { | 100 | if (canvas.elementModel) { |
105 | if (canvas.elementModel.shapeModel.GLWorld) { | 101 | if (canvas.elementModel.shapeModel.GLWorld) { |
106 | canvas.elementModel.shapeModel.GLWorld.clearTree(); | 102 | canvas.elementModel.shapeModel.GLWorld.clearTree(); |
@@ -194,6 +190,13 @@ exports.webGlDocumentHelper = Montage.create(Component, { | |||
194 | // | 190 | // |
195 | collectGLData: { | 191 | collectGLData: { |
196 | value: function( elt, dataArray ) { | 192 | value: function( elt, dataArray ) { |
193 | Array.prototype.slice.call(elt.querySelectorAll('[data-RDGE-id]'),0).forEach(function(glCanvas) { | ||
194 | dataArray.push(glCanvas.elementModel.shapeModel.GLWorld.exportJSON()); | ||
195 | }); | ||
196 | |||
197 | // Removing the old loop that went through all the elements. | ||
198 | // TODO: Remove the following code once QE has tested it. | ||
199 | /* | ||
197 | // | 200 | // |
198 | var i, data, nKids, child; | 201 | var i, data, nKids, child; |
199 | // | 202 | // |
@@ -209,6 +212,7 @@ exports.webGlDocumentHelper = Montage.create(Component, { | |||
209 | this.collectGLData( child, dataArray ); | 212 | this.collectGLData( child, dataArray ); |
210 | } | 213 | } |
211 | } | 214 | } |
215 | */ | ||
212 | } | 216 | } |
213 | } | 217 | } |
214 | //////////////////////////////////////////////////////////////////// | 218 | //////////////////////////////////////////////////////////////////// |