From 69d90467865a1384725b2301901be2180c5a841f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 9 Mar 2012 15:58:40 -0800 Subject: reverting old pi data Signed-off-by: Valerio Virgillito --- js/data/pi/pi-data.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index c42d9082..ba03c347 100755 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -331,10 +331,11 @@ exports.PiData = Montage.create( Montage, { id: "tlRadius", prop : "tlRadius", label: "TL", + valueMutator: parseFloat, value : 0, min : 0, max : 100, - unit : "%", + unit : "px", acceptableUnits: ["px", "pt", "%"] }, { @@ -342,10 +343,12 @@ exports.PiData = Montage.create( Montage, { id : "trRadius", prop : "trRadius", label : "TR", + valueMutator: parseFloat, min : 0, max : 100, - unit : "%", - acceptableUnits: ["px", "pt", "%"] + unit : "px", + acceptableUnits: ["px", "pt", "%"], + divider: true } ], [ @@ -354,9 +357,10 @@ exports.PiData = Montage.create( Montage, { id : "blRadius", prop : "blRadius", label : "BL", + valueMutator: parseFloat, min : 0, max : 100, - unit : "%", + unit : "px", acceptableUnits: ["px", "pt", "%"] }, { @@ -364,9 +368,10 @@ exports.PiData = Montage.create( Montage, { id : "brRadius", prop : "brRadius", label : "BR", + valueMutator: parseFloat, min : 0, max : 100, - unit : "%", + unit : "px", acceptableUnits: ["px", "pt", "%"] } ] @@ -390,6 +395,7 @@ exports.PiData = Montage.create( Montage, { { type: "dropdown", id: "strokeMaterial", + prop: "strokeMaterial", label: "Stroke", labelField: "_name", dataField: "_name", @@ -402,6 +408,7 @@ exports.PiData = Montage.create( Montage, { { type: "dropdown", id: "fillMaterial", + prop: "fillMaterial", label: "Fill", labelField: "_name", dataField: "_name", @@ -524,7 +531,8 @@ exports.PiData = Montage.create( Montage, { type: "hottext", id: "innerRadius", prop: "innerRadius", - label: "Inner Radius", + label: "Inner R", + valueMutator: parseFloat, value : 0, min : 0, max : 100, @@ -553,6 +561,7 @@ exports.PiData = Montage.create( Montage, { { type: "dropdown", id: "strokeMaterial", + prop: "strokeMaterial", label: "Stroke", labelField: "_name", dataField: "_name", @@ -565,6 +574,7 @@ exports.PiData = Montage.create( Montage, { { type: "dropdown", id: "fillMaterial", + prop: "fillMaterial", label: "Fill", labelField: "_name", dataField: "_name", -- cgit v1.2.3 From d8c9578ced2c0dad0a9152ff955511986d9c013d Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 10 Mar 2012 13:21:50 -0800 Subject: Setting local path to assets This is still no resolving issues with webGL runtime. --- js/mediators/io-mediator.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index d26c7a88..11aeb74d 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -431,6 +431,7 @@ function initWebGl (e) {\n\ }\n\ //Creating data manager\n\ cvsDataMngr = new CanvasDataManager();\n\ + g_Engine._assetPath = '"+rdgeDirName+"/';\n\ //Loading data to canvas(es)\n\ cvsDataMngr.loadGLData(document.body, ninjaWebGlData.data, '"+rdgeDirName+"/');\n\ }\ -- cgit v1.2.3 From 615be47750fb86c07acd9354da12a76abe6c24e0 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 10 Mar 2012 16:27:48 -0800 Subject: Temp Runtime WebGL Fix Added a temporary fix to allow for webGL runtime functionality. Copying the desired folder name into a static name. There is a lag in doing this, so obviously now ideal. Need to discuss adding dynamic path-ing during author and runtime. --- js/io/system/ninjalibrary.js | 6 ++++-- js/mediators/io-mediator.js | 11 +++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js index ff949613..201598fc 100644 --- a/js/io/system/ninjalibrary.js +++ b/js/io/system/ninjalibrary.js @@ -82,7 +82,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { // copyLibToCloud: { enumerable: false, - value: function (path, libName) { + value: function (path, libName, callback) { // if(this.coreApi.directoryExists({uri: path+libName}).status === 404) { this.chromeApi.directoryContents(this.chromeApi.fileSystem.root, function (contents) { @@ -91,7 +91,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { //Getting contents of library to be copied this.chromeApi.directoryContents(contents[i], function (lib) { //Creating directory structure from subfolders - this.copyDirectoryToCloud(path, contents[i], path, function (status) {console.log(status)}); + this.copyDirectoryToCloud(path, contents[i], path, callback); }.bind(this)); break; } @@ -138,6 +138,8 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { } }.bind(this)); } + //TODO Add logic for proper callback status(es) + if (callback) callback(true); } }, //////////////////////////////////////////////////////////////////// diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index 11aeb74d..e9661f20 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -355,7 +355,15 @@ exports.IoMediator = Montage.create(Component, { if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { rdgeDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); rdgeVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; - this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, rdgeDirName); + this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, rdgeDirName, hackRename.bind(this)); + //TODO: Remove, this is copying the library into a static name + function hackRename (status) { + if (status) { + setTimeout(function () { + this.application.ninja.coreIoApi.copyDirectory({sourceUri: template.document.root+rdgeDirName, destUri: template.document.root+'assets'}); + }.bind(this), 3000); + } + } } else { //TODO: Error handle no available library to copy } @@ -431,7 +439,6 @@ function initWebGl (e) {\n\ }\n\ //Creating data manager\n\ cvsDataMngr = new CanvasDataManager();\n\ - g_Engine._assetPath = '"+rdgeDirName+"/';\n\ //Loading data to canvas(es)\n\ cvsDataMngr.loadGLData(document.body, ninjaWebGlData.data, '"+rdgeDirName+"/');\n\ }\ -- cgit v1.2.3 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