mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 08:09:52 +08:00
refactor(editor): mount worker renderer in editor host (#10055)
This would allow for easier integration with current test runner, since the two column layout is removed. The `ViewportTurboRender` canvas and its debug UI are only enabled if the extension is added, which won't affect the AFFiNE entry. <img width="945" alt="image" src="https://github.com/user-attachments/assets/dc82daa4-cbed-4eb9-9660-28c3f7d35722" />
This commit is contained in:
@@ -12,10 +12,11 @@ presetsEffects();
|
||||
|
||||
export const doc = createEmptyDoc().init();
|
||||
export const editor = new AffineEditorContainer();
|
||||
editor.pageSpecs = editor.pageSpecs.concat([ViewportTurboRendererExtension]);
|
||||
editor.edgelessSpecs = editor.edgelessSpecs.concat([
|
||||
editor.pageSpecs = [...editor.pageSpecs, ViewportTurboRendererExtension];
|
||||
editor.edgelessSpecs = [
|
||||
...editor.edgelessSpecs,
|
||||
ViewportTurboRendererExtension,
|
||||
]);
|
||||
];
|
||||
|
||||
editor.doc = doc;
|
||||
editor.mode = 'edgeless';
|
||||
|
||||
Reference in New Issue
Block a user