事件替换颜色等画布
This commit is contained in:
@@ -199,9 +199,12 @@ export class LayerManager {
|
||||
if (!this.canvas) return;
|
||||
if (isUseOptimize) {
|
||||
// 优化渲染 - 统一批处理 支持异步回调
|
||||
await optimizeCanvasRendering(this.canvas, async () => {
|
||||
// 应用图层交互规则
|
||||
await this._applyInteractionRules({ isMoveing });
|
||||
await new Promise((resolve) => {
|
||||
optimizeCanvasRendering(this.canvas, async () => {
|
||||
// 应用图层交互规则
|
||||
await this._applyInteractionRules({ isMoveing });
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// 直接应用图层交互规则
|
||||
@@ -333,7 +336,6 @@ export class LayerManager {
|
||||
const objects = this.canvas.getObjects();
|
||||
const editorMode = this.editorMode || CanvasConfig.defaultTool;
|
||||
const layers = this.layers?.value || [];
|
||||
|
||||
// 创建缓存以避免重复查找
|
||||
const layerMap = {};
|
||||
layers.forEach((layer) => {
|
||||
|
||||
Reference in New Issue
Block a user