aboutsummaryrefslogtreecommitdiff
path: root/js/document/views/design.js
diff options
context:
space:
mode:
authorEric Guzman2012-05-22 15:57:23 -0700
committerEric Guzman2012-05-22 15:57:23 -0700
commitad3b4595d7377e5bf75bcb8ad81007859b0a8a02 (patch)
treeecb7fe289824a625b1dc422a97c2236826081ec3 /js/document/views/design.js
parent0eb95ff2dbba1fe7213eed2e0140b4d07bda3dd5 (diff)
parent2b207ef8b2594927f8cd6cd63a8483d205cb86c4 (diff)
downloadninja-ad3b4595d7377e5bf75bcb8ad81007859b0a8a02.tar.gz
Merge branch 'dom-architecture' of github.com:Motorola-Mobility/ninja-internal into CSSPanelUpdates
Conflicts: js/controllers/styles-controller.js
Diffstat (limited to 'js/document/views/design.js')
-rwxr-xr-xjs/document/views/design.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js
index 3f58650e..b3887fdf 100755
--- a/js/document/views/design.js
+++ b/js/document/views/design.js
@@ -324,7 +324,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
324 initWebGl: { 324 initWebGl: {
325 value: function (scripttags) { 325 value: function (scripttags) {
326 // 326 //
327 var n, webgldata; 327 var n, webgldata, fileRead;
328 //Setting the iFrame property for reference in helper class 328 //Setting the iFrame property for reference in helper class
329 this.model.webGlHelper.iframe = this.model.views.design.iframe; 329 this.model.webGlHelper.iframe = this.model.views.design.iframe;
330 //Checking for webGL Data 330 //Checking for webGL Data
@@ -333,9 +333,18 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
333 webgldata = null; 333 webgldata = null;
334 //Checking for tags with webGL data 334 //Checking for tags with webGL data
335 if (scripttags[w].getAttribute) { 335 if (scripttags[w].getAttribute) {
336 if (scripttags[w].getAttribute('data-ninja-webgl') !== null) { 336 if (scripttags[w].getAttribute('data-ninja-canvas') !== null) {
337 //TODO: Add logic to handle more than one data tag 337 //TODO: Add logic to handle more than one data tag
338 webgldata = JSON.parse((scripttags[w].innerHTML.replace("(", "")).replace(")", "")); 338 webgldata = JSON.parse((scripttags[w].innerHTML.replace("(", "")).replace(")", ""));
339 } else if (scripttags[w].getAttribute('data-ninja-canvas-json') !== null) {
340 //TODO: Add check for hardcoded URL
341 fileRead = this.application.ninja.ioMediator.fio.readFile({uri: this.application.ninja.documentController.documentHackReference.root+scripttags[w].getAttribute('data-ninja-canvas-json')});
342 //
343 if (fileRead.status === 204) {
344 webgldata = JSON.parse((fileRead.file.content.replace("(", "")).replace(")", ""));
345 } else {
346 //Error
347 }
339 } 348 }
340 //Checking for webGL data and building data array 349 //Checking for webGL data and building data array
341 if (webgldata && webgldata.data) { 350 if (webgldata && webgldata.data) {