mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-06 08:50:50 +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 {
|
import {
|
||||||
FrameBlockModel,
|
FrameBlockModel,
|
||||||
GroupElementModel,
|
|
||||||
ImageBlockModel,
|
ImageBlockModel,
|
||||||
type NoteBlockModel,
|
type NoteBlockModel,
|
||||||
type RootBlockModel,
|
type RootBlockModel,
|
||||||
@@ -26,6 +25,7 @@ import {
|
|||||||
type GfxController,
|
type GfxController,
|
||||||
GfxControllerIdentifier,
|
GfxControllerIdentifier,
|
||||||
type GfxPrimitiveElementModel,
|
type GfxPrimitiveElementModel,
|
||||||
|
isGfxGroupCompatibleModel,
|
||||||
} from '@blocksuite/block-std/gfx';
|
} from '@blocksuite/block-std/gfx';
|
||||||
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
|
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
|
||||||
import type { IBound } from '@blocksuite/global/gfx';
|
import type { IBound } from '@blocksuite/global/gfx';
|
||||||
@@ -525,8 +525,8 @@ export class ExportManager {
|
|||||||
|
|
||||||
if (surfaces?.length) {
|
if (surfaces?.length) {
|
||||||
const surfaceElements = surfaces.flatMap(element =>
|
const surfaceElements = surfaces.flatMap(element =>
|
||||||
element instanceof GroupElementModel
|
isGfxGroupCompatibleModel(element)
|
||||||
? (element.childElements.filter(
|
? (element.descendantElements.filter(
|
||||||
el => el instanceof SurfaceElementModel
|
el => el instanceof SurfaceElementModel
|
||||||
) as SurfaceElementModel[])
|
) as SurfaceElementModel[])
|
||||||
: element
|
: element
|
||||||
|
|||||||
Reference in New Issue
Block a user