mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
fix(editor): zindex of frame child not updated (#10580)
Close [BS-2689](https://linear.app/affine-design/issue/BS-2689/[bug]-%E5%BD%93%E5%B1%82%E7%BA%A7%E4%BD%8E%E4%BA%8E-frame-%E7%9A%84yuan%E7%B4%A0%E8%A2%AB%E6%8B%96%E5%85%A5-frame-%E6%97%B6%E5%B1%82%E7%BA%A7%E5%BA%94%E8%AF%A5%E8%A2%AB%E8%87%AA%E5%8A%A8%E6%8B%89%E9%AB%98%E5%B5%8C%E5%85%A5-frame)
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user