added grid

This commit is contained in:
2023-06-30 18:53:15 +05:00
parent de5879069b
commit c81c42df77
8 changed files with 156 additions and 53 deletions

View File

@ -56,15 +56,22 @@ function load_proj(){
load_local(JSON.parse(res["body"]));
drag_start();
}
else if(res["out"] == "bad proj"){
console.log("bad");
save(()=>{
goto("/proj/"+proj_name);
});
}
})
}
function save(){
function save(callback){
// console.log(objs);
$.post( "/save_proj", {proj:JSON.stringify(objs),name:proj_name})
.done(function( res ) {
if(res["out"] == "good"){
console.log("good");
if(callback) callback(res);
}
})
}