画布loading
This commit is contained in:
@@ -1580,7 +1580,7 @@ export class LayerManager {
|
||||
/**
|
||||
* 排序图层,确保图层顺序: 普通图层 > 固定图层 > 背景图层
|
||||
*/
|
||||
sortLayers() {
|
||||
async sortLayers() {
|
||||
// 对图层进行排序:背景图层在最底层(数组最后),固定图层在中间
|
||||
this.layers.value.sort((a, b) => {
|
||||
// 如果a是背景图层,它应该排在后面(最底层)
|
||||
@@ -1604,17 +1604,17 @@ export class LayerManager {
|
||||
});
|
||||
|
||||
// 更新画布对象顺序
|
||||
this._rearrangeObjects();
|
||||
await this._rearrangeObjects();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新排列画布上的对象以匹配图层顺序
|
||||
* @private
|
||||
*/
|
||||
_rearrangeObjects() {
|
||||
async _rearrangeObjects() {
|
||||
if (this.layerSort) {
|
||||
// 使用LayerSort的高级排序
|
||||
this.layerSort.rearrangeObjects();
|
||||
await this.layerSort.rearrangeObjects();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user