aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/document/html-document.js8
-rw-r--r--js/mediators/io-mediator.js2
2 files changed, 6 insertions, 4 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 7ab4272b..8f9d2870 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -871,7 +871,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
871 //TODO: Add logic to handle save before preview 871 //TODO: Add logic to handle save before preview
872 this.application.ninja.documentController.handleExecuteSaveAll(null); 872 this.application.ninja.documentController.handleExecuteSaveAll(null);
873 //Temp check for webGL Hack 873 //Temp check for webGL Hack
874 if (this.application.ninja.documentController.activeDocument.glData.length && this.application.ninja.documentController.activeDocument.glData.length > 0) { 874 if (this.application.ninja.documentController.activeDocument.glData.length && this.application.ninja.documentController.activeDocument.glData.length > 1) {//TODO: Should be 0, temp hack fix
875 setTimeout(function () {window.open(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]);}.bind(this), 3500); 875 setTimeout(function () {window.open(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]);}.bind(this), 3500);
876 } else { 876 } else {
877 window.open(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]); 877 window.open(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]);
@@ -894,7 +894,8 @@ exports.HTMLDocument = Montage.create(TextDocument, {
894 } 894 }
895 } 895 }
896 } 896 }
897 return {mode: 'html', document: this._userDocument, mjs: this._userComponents, webgl: this.glData, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; 897 //return {mode: 'html', document: this._userDocument, mjs: this._userComponents, webgl: this.glData, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
898 return {mode: 'html', document: this._userDocument, webgl: this.glData, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
898 } else if (this.currentView === "code"){ 899 } else if (this.currentView === "code"){
899 //TODO: Would this get call when we are in code of HTML? 900 //TODO: Would this get call when we are in code of HTML?
900 } else { 901 } else {
@@ -917,7 +918,8 @@ exports.HTMLDocument = Montage.create(TextDocument, {
917 } 918 }
918 } 919 }
919 } 920 }
920 return {mode: 'html', document: this._userDocument, mjs: this._userComponents, webgl: this.glData, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; 921 //return {mode: 'html', document: this._userDocument, mjs: this._userComponents, webgl: this.glData, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
922 return {mode: 'html', document: this._userDocument, webgl: this.glData, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
921 } else if (this.currentView === "code"){ 923 } else if (this.currentView === "code"){
922 //TODO: Would this get call when we are in code of HTML? 924 //TODO: Would this get call when we are in code of HTML?
923 } else { 925 } else {
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index cbed3a99..1efbb8bb 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -348,7 +348,7 @@ exports.IoMediator = Montage.create(Component, {
348 } 348 }
349 } 349 }
350 //Checking for webGL elements in document 350 //Checking for webGL elements in document
351 if (template.webgl && template.webgl.length > 0) { 351 if (template.webgl && template.webgl.length > 1) {//TODO: Should be length 0, hack for a temp fix
352 var rdgeDirName, rdgeVersion; 352 var rdgeDirName, rdgeVersion;
353 //Copy webGL library if needed 353 //Copy webGL library if needed
354 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { 354 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) {