mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 07:06:28 +08:00
fix(editor): descendant elements are missing in edgelessToCanvas (#10933)
### Before  ### After 
This commit is contained in:
+3
-3
@@ -1,6 +1,5 @@
|
||||
import {
|
||||
FrameBlockModel,
|
||||
GroupElementModel,
|
||||
ImageBlockModel,
|
||||
type NoteBlockModel,
|
||||
type RootBlockModel,
|
||||
@@ -26,6 +25,7 @@ import {
|
||||
type GfxController,
|
||||
GfxControllerIdentifier,
|
||||
type GfxPrimitiveElementModel,
|
||||
isGfxGroupCompatibleModel,
|
||||
} from '@blocksuite/block-std/gfx';
|
||||
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
|
||||
import type { IBound } from '@blocksuite/global/gfx';
|
||||
@@ -525,8 +525,8 @@ export class ExportManager {
|
||||
|
||||
if (surfaces?.length) {
|
||||
const surfaceElements = surfaces.flatMap(element =>
|
||||
element instanceof GroupElementModel
|
||||
? (element.childElements.filter(
|
||||
isGfxGroupCompatibleModel(element)
|
||||
? (element.descendantElements.filter(
|
||||
el => el instanceof SurfaceElementModel
|
||||
) as SurfaceElementModel[])
|
||||
: element
|
||||
|
||||
Reference in New Issue
Block a user