modified: public/lib/fn.js
modified:   public/lib/inter.js
	modified:   views/admin/objects/object_edit.ejs
	modified:   views/project.ejs
    fix:
    Не обновляет данные при внесении изменений. сам объект в редакторе обновляется, но в панели остаются первые данные.
    Выделение объекта не должно сохранятся при скачивании.
			
			
This commit is contained in:
		| @ -361,26 +361,26 @@ async function removeImageBackground(image) { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // $.post( "/get_objs") | ||||
|     // .done(function( res ) { | ||||
|     //     if(res["out"] == "good"){ | ||||
|     //         // console.log(res["body"]); | ||||
|     //         let sources = []; | ||||
|     //         res["body"].forEach(element => { | ||||
|     //             sources.push(element["img"]); | ||||
|     //             if(element == res["body"].at(-1)){ | ||||
|     //                 // console.log(sources); | ||||
|     //                 preloadImages(sources,()=>{ | ||||
|     //                     // console.log("cached"); | ||||
|     //                     callback(); | ||||
|     //                     // sources.forEach(element => { | ||||
|     //                     //     console.log(element,is_cached(element)); | ||||
|     //                     // }); | ||||
|     //                 }) | ||||
|     //             } | ||||
|     //         }); | ||||
|     //     } | ||||
|     // }); | ||||
|     $.post( "/get_objs") | ||||
|     .done(function( res ) { | ||||
|         if(res["out"] == "good"){ | ||||
|             // console.log(res["body"]); | ||||
|             let sources = []; | ||||
|             res["body"].forEach(element => { | ||||
|                 sources.push(element["img"]); | ||||
|                 if(element == res["body"].at(-1)){ | ||||
|                     // console.log(sources); | ||||
|                     preloadImages(sources,()=>{ | ||||
|                         // console.log("cached"); | ||||
|                         callback(); | ||||
|                         // sources.forEach(element => { | ||||
|                         //     console.log(element,is_cached(element)); | ||||
|                         // }); | ||||
|                     }) | ||||
|                 } | ||||
|             }); | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     function is_cached(img_url){ | ||||
|         var imgEle = document.createElement("img"); | ||||
|  | ||||
| @ -108,19 +108,20 @@ function obj_click(id){ | ||||
|         obj_selection(); | ||||
|         // console.log(obj.); | ||||
|     } | ||||
|     function obj_selection(){ | ||||
|         let drags = document.getElementsByClassName("drag"); | ||||
|         Object.values(drags).forEach(element => { | ||||
|             // console.log(element.id,cur_obj); | ||||
|             if (element.id != cur_obj){ | ||||
|                 element.style.border = "0px"; | ||||
|             } | ||||
|             else{ | ||||
|                 element.style.border = "2px black solid";  | ||||
|                 element.style.borderRadius = "0.2vw";  | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
| } | ||||
| function obj_selection(clear = false){ | ||||
|     cur_obj = (clear == true)? null:cur_obj; | ||||
|     let drags = document.getElementsByClassName("drag"); | ||||
|     Object.values(drags).forEach(element => { | ||||
|         // console.log(element.id,cur_obj); | ||||
|         if (element.id != cur_obj){ | ||||
|             element.style.border = "0px"; | ||||
|         } | ||||
|         else{ | ||||
|             element.style.border = "2px black solid";  | ||||
|             element.style.borderRadius = "0.2vw";  | ||||
|         } | ||||
|     }); | ||||
| } | ||||
|  | ||||
| function resize_drags(){ | ||||
|  | ||||
		Reference in New Issue
	
	Block a user