aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/html-document.js16
1 files changed, 2 insertions, 14 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 2bb277e7..6324d5ed 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -212,7 +212,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
212 { 212 {
213 /* 213 /*
214 // Use this code to test the runtime version of WebGL 214 // Use this code to test the runtime version of WebGL
215 var cdm = new CanvasDataManager(); 215 var cdm = new NinjaCvsRt.CanvasDataManager();
216 cdm.loadGLData(elt, value, null ); 216 cdm.loadGLData(elt, value, null );
217 */ 217 */
218 218
@@ -276,13 +276,6 @@ exports.HTMLDocument = Montage.create(TextDocument, {
276 var world = new GLWorld( canvas, useWebGL ); 276 var world = new GLWorld( canvas, useWebGL );
277 world.importJSON( jObj ); 277 world.importJSON( jObj );
278 } 278 }
279 else
280 {
281 var index = importStr.indexOf( "webGL: " );
282 var useWebGL = (index >= 0);
283 var world = new GLWorld( canvas, useWebGL );
284 world.import( importStr );
285 }
286 279
287 this.buildShapeModel( canvas.elementModel, world ); 280 this.buildShapeModel( canvas.elementModel, world );
288 } 281 }
@@ -427,7 +420,6 @@ exports.HTMLDocument = Montage.create(TextDocument, {
427 if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld) 420 if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld)
428 { 421 {
429 var data = elt.elementModel.shapeModel.GLWorld.exportJSON(); 422 var data = elt.elementModel.shapeModel.GLWorld.exportJSON();
430 //var data = elt.elementModel.shapeModel.GLWorld.export();
431 dataArray.push( data ); 423 dataArray.push( data );
432 } 424 }
433 425
@@ -872,11 +864,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
872 //TODO: Add logic to handle save before preview 864 //TODO: Add logic to handle save before preview
873 this.application.ninja.documentController.handleExecuteSaveAll(null); 865 this.application.ninja.documentController.handleExecuteSaveAll(null);
874 //Temp check for webGL Hack 866 //Temp check for webGL Hack
875 if (this.application.ninja.documentController.activeDocument.glData.length && this.application.ninja.documentController.activeDocument.glData.length > 1) {//TODO: Should be 0, temp hack fix 867 window.open(this.application.ninja.coreIoApi.rootUrl + this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]);
876 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);
877 } else {
878 window.open(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]);
879 }
880 //chrome.tabs.create({url: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]}); 868 //chrome.tabs.create({url: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]});
881 } 869 }
882 }, 870 },