feat: edgeless dnd preview (#10117)

This commit is contained in:
doouding
2025-02-12 12:37:07 +00:00
parent f89fcf82f8
commit 270d1754a3
5 changed files with 145 additions and 51 deletions

View File

@@ -110,7 +110,7 @@ export class EdgelessRootPreviewBlockComponent
this.std
.get(FontLoaderService)
.ready.then(() => {
this.surface.refresh();
this.surface?.refresh();
})
.catch(console.error);
}
@@ -173,7 +173,9 @@ export class EdgelessRootPreviewBlockComponent
private _initSlotEffects() {
this.disposables.add(
this.std.get(ThemeProvider).theme$.subscribe(() => this.surface.refresh())
this.std
.get(ThemeProvider)
.theme$.subscribe(() => this.surface?.refresh())
);
}