设置画布loading
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1335,7 +1335,7 @@ backgroundObject.scaleY,'CanvasManager resetCanvasSizeByFixedLayer')
|
||||
}
|
||||
}
|
||||
loadJSON(json, calllBack) {
|
||||
|
||||
this.canvas.loading.value = true;
|
||||
// 确保传入的json是字符串格式
|
||||
if (typeof json === "object") {
|
||||
json = JSON.stringify(json);
|
||||
@@ -1507,7 +1507,6 @@ backgroundObject.scaleY,'CanvasManager resetCanvasSizeByFixedLayer')
|
||||
*/
|
||||
async createOtherLayers(otherData) {
|
||||
if (!otherData) return console.warn("otherData 为空不需要添加");
|
||||
this.canvas.loading.value = true;
|
||||
let resolve = ()=>{};
|
||||
this.awaitCanvasRun = ()=>(new Promise((v) => resolve = v))
|
||||
const otherData_ = JSON.parse(JSON.stringify(otherData));
|
||||
@@ -1555,7 +1554,6 @@ backgroundObject.scaleY,'CanvasManager resetCanvasSizeByFixedLayer')
|
||||
console.log("==========创建其他图层成功");
|
||||
resolve();
|
||||
this.awaitCanvasRun = null;
|
||||
this.canvas.loading.value = false;
|
||||
}
|
||||
|
||||
// 设置画布对象的裁剪信息
|
||||
|
||||
Reference in New Issue
Block a user