donteatfriedrice
2024-07-25 07:26:39 +00:00
parent 2b42f84815
commit dd6901fe15
23 changed files with 156 additions and 166 deletions

View File

@@ -26,6 +26,10 @@ function fitViewport(
xywh?: `[${number},${number},${number},${number}]`
) {
try {
if (!editor.host) {
throw new Error('editor host is not ready');
}
const rootService =
editor.host.std.spec.getService<EdgelessRootService>('affine:page');
rootService.viewport.onResize();
@@ -113,6 +117,10 @@ export function DocPeekPreview({
if (editor) {
editor.updateComplete
.then(() => {
if (!editor.host) {
return;
}
const rootService = editor.host.std.spec.getService('affine:page');
// doc change event inside peek view should be handled by peek view
disposableGroup.add(