L-Sun
2025-03-03 10:51:27 +00:00
parent 889625cdaa
commit 37fbfbcf3e
2 changed files with 67 additions and 2 deletions

View File

@@ -514,7 +514,8 @@ export class LayerManager {
const isLocalElem = element instanceof GfxLocalElementModel;
const indexChanged = !props || 'index' in props;
const childIdsChanged = props && 'childIds' in props;
const childIdsChanged =
props && ('childIds' in props || 'childElementIds' in props);
const shouldUpdateGroupChildren =
isGfxGroupCompatibleModel(element) && (indexChanged || childIdsChanged);
const updateArray = (array: GfxModel[], element: GfxModel) => {
@@ -798,7 +799,7 @@ export class LayerManager {
if (
(payload.props.key === 'index' ||
payload.props.key === 'childIds') &&
payload.props.key === 'childElementIds') &&
block instanceof GfxBlockElementModel &&
(block.parent instanceof SurfaceBlockModel ||
block.parent?.role === 'root')