diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/document/html-document.js | 6 | ||||
-rw-r--r-- | js/mediators/io-mediator.js | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js index 5d507476..536fca47 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js | |||
@@ -668,7 +668,8 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
668 | } | 668 | } |
669 | } | 669 | } |
670 | } | 670 | } |
671 | return {mode: 'html', document: this._userDocument, webgl: this.glData, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; | 671 | //return {mode: 'html', document: this._userDocument, webgl: this.glData, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; |
672 | return {mode: 'html', document: this._userDocument, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; | ||
672 | } else if (this.currentView === "code"){ | 673 | } else if (this.currentView === "code"){ |
673 | //TODO: Would this get call when we are in code of HTML? | 674 | //TODO: Would this get call when we are in code of HTML? |
674 | } else { | 675 | } else { |
@@ -691,7 +692,8 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
691 | } | 692 | } |
692 | } | 693 | } |
693 | } | 694 | } |
694 | return {mode: 'html', document: this._userDocument, webgl: this.glData, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; | 695 | //return {mode: 'html', document: this._userDocument, webgl: this.glData, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; |
696 | return {mode: 'html', document: this._userDocument, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; | ||
695 | } else if (this.currentView === "code"){ | 697 | } else if (this.currentView === "code"){ |
696 | //TODO: Would this get call when we are in code of HTML? | 698 | //TODO: Would this get call when we are in code of HTML? |
697 | } else { | 699 | } else { |
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index e763c67c..65218526 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js | |||
@@ -150,7 +150,7 @@ exports.IoMediator = Montage.create(Component, { | |||
150 | switch (file.mode) { | 150 | switch (file.mode) { |
151 | case 'html': | 151 | case 'html': |
152 | //Copy webGL library if needed | 152 | //Copy webGL library if needed |
153 | if (file.webgl.length > 0) { | 153 | if (file.webgl && file.webgl.length > 0) { |
154 | for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { | 154 | for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { |
155 | //Checking for RDGE library to be available | 155 | //Checking for RDGE library to be available |
156 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { | 156 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { |
@@ -308,7 +308,7 @@ exports.IoMediator = Montage.create(Component, { | |||
308 | } | 308 | } |
309 | } | 309 | } |
310 | //Checking for webGL elements in document | 310 | //Checking for webGL elements in document |
311 | if (template.webgl.length) { | 311 | if (template.webgl && template.webgl.length) { |
312 | // | 312 | // |
313 | var json, matchingtags = [], webgltag, scripts = template.document.content.document.getElementsByTagName('script'); | 313 | var json, matchingtags = [], webgltag, scripts = template.document.content.document.getElementsByTagName('script'); |
314 | // | 314 | // |