feat: 液化撤销问题修复+选取更改逻辑+右键删除组图层问题修复

This commit is contained in:
bighuixiang
2025-07-09 00:22:03 +08:00
parent 5cc93aeba4
commit 943b49c1d7
9 changed files with 1668 additions and 545 deletions

View File

@@ -524,7 +524,10 @@ export function findLayerRecursively(layers, layerId, parent = null) {
*/
export function findInChildLayers(children, layerId, parent) {
if (!children || !Array.isArray(children) || !layerId) {
return null;
return {
layer: null,
parent: null,
};
}
for (const child of children) {
@@ -540,7 +543,7 @@ export function findInChildLayers(children, layerId, parent) {
Array.isArray(child.children)
) {
const result = findInChildLayers(child.children, layerId, child);
if (result) {
if (result && result.layer) {
return result;
}
}