修改图层选择激活对象方法

This commit is contained in:
李志鹏
2025-11-10 16:59:28 +08:00
parent 8442412a34
commit 804040d9fd
4 changed files with 11 additions and 2 deletions

View File

@@ -1219,6 +1219,10 @@ export class LayerManager {
}
// 切换到选择模式
this?.toolManager?.setTool(OperationType.SELECT);
if(objects.length === 1) {
this.canvas.setActiveObject(objects[0]);
return objects[0];
}
// 创建一个新的活动选择组
const activeSelection = new fabric.ActiveSelection(objects, {
canvas: this.canvas,