From 6bc07657c8ef58e6efddd383748ecf84d1c789ad Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 16 Feb 2012 15:58:26 -0800 Subject: Adding new RDGE library data --- js/mediators/io-mediator.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'js/mediators') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index e9958ec3..56869839 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -143,6 +143,16 @@ exports.IoMediator = Montage.create(Component, { // switch (file.mode) { case 'html': + //Copy webGL library if needed + if (file.webgl.length > 0) { + for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { + //if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Assets' || this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { + if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { + this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(file.document.root, (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase()); + } + } + } + // contents = this.parseNinjaTemplateToHtml(file); break; default: @@ -192,17 +202,6 @@ exports.IoMediator = Montage.create(Component, { // template.document.content.document.body.innerHTML = template.body; template.document.content.document.head.innerHTML = template.head; - // - if (template.webgl.length > 0) { - for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { - if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Assets' || this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { - this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase()); - } - } - - //this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(path, libname); - //console.log(this.application.ninja.coreIoApi.ninjaLibrary.libs); - } //TODO: Remove temp fix for styles if (template.style) { template.document.content.document.head.getElementsByTagName('style')[0].innerHTML = this.getCssFromRules(template.style.cssRules); -- cgit v1.2.3