From 242bddd5b64c4a5226daa2f4caa10bf63c56403a Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 10 Mar 2012 18:37:43 -0800 Subject: Add temp delay for webGL preview Added a padded launch webGL preview delay. This is very temporary, just a work around until RDGE issues are fixed. --- js/document/html-document.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/document/html-document.js b/js/document/html-document.js index 79450494..051490f5 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js @@ -871,8 +871,12 @@ exports.HTMLDocument = Montage.create(TextDocument, { value: function () { //TODO: Add logic to handle save before preview this.application.ninja.documentController.handleExecuteSaveAll(null); - //Launching 'blank' tab for testing movie - window.open(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]); + //Temp check for webGL Hack + if (this.application.ninja.documentController.activeDocument.glData.length && this.application.ninja.documentController.activeDocument.glData.length > 0) { + 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); + } else { + window.open(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]); + } //chrome.tabs.create({url: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]}); } }, -- cgit v1.2.3