From d9015ea49cbcf38653c98e1ce4db70cfbace657a Mon Sep 17 00:00:00 2001 From: Rick Companje Date: Tue, 2 Jun 2015 14:40:51 +0200 Subject: [PATCH] autoLoad sketch --- js/sketches.js | 2 ++ www/printmanager/js/main.js | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/sketches.js b/js/sketches.js index 68c90cd..8488bfe 100644 --- a/js/sketches.js +++ b/js/sketches.js @@ -32,6 +32,8 @@ function listSketches() { curSketch = sketches.length-1; setSketchModified(false); updateSketchButtonStates(); + + if (autoLoadSketchId) loadSketch(autoLoadSketchId); } }) } diff --git a/www/printmanager/js/main.js b/www/printmanager/js/main.js index b3c52d4..2ebce04 100644 --- a/www/printmanager/js/main.js +++ b/www/printmanager/js/main.js @@ -22,7 +22,8 @@ var app = function() { var doodles = []; var appURL = '/'; - API.setURL('/d3dapi/'); //10.0.0.212 + if (location.host=='doodle3d') API.setURL('http://wifibox/d3dapi/'); //local + else API.setURL('/d3dapi/'); init(); @@ -90,7 +91,7 @@ var app = function() { sketchAPI.save(doodle.getSvgFileData(),function(response) { console.log('saved!',response); - location.href = appURL; // + "&load=" + response.id; + location.href = appURL + "?load=" + response.id; }); }