autoLoad sketch

This commit is contained in:
Rick Companje 2015-06-02 14:40:51 +02:00
parent 03eb8da096
commit d9015ea49c
2 changed files with 5 additions and 2 deletions

View File

@ -32,6 +32,8 @@ function listSketches() {
curSketch = sketches.length-1;
setSketchModified(false);
updateSketchButtonStates();
if (autoLoadSketchId) loadSketch(autoLoadSketchId);
}
})
}

View File

@ -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;
});
}