mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-16 05:47:09 +08:00
chore(editor): update default width of page block (#10873)
Close [BS-2498](https://linear.app/affine-design/issue/BS-2498/page-block首次切换时默认宽度为800px)
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
DEFAULT_PAGE_BLOCK_HEIGHT,
|
||||
DEFAULT_PAGE_BLOCK_WIDTH,
|
||||
} from '@blocksuite/affine-model';
|
||||
import type { Workspace } from '@blocksuite/store';
|
||||
import { Text } from '@blocksuite/store';
|
||||
|
||||
@@ -17,7 +21,13 @@ export function createDefaultDoc(
|
||||
});
|
||||
|
||||
doc.addBlock('affine:surface', {}, rootId);
|
||||
const noteId = doc.addBlock('affine:note', {}, rootId);
|
||||
const noteId = doc.addBlock(
|
||||
'affine:note',
|
||||
{
|
||||
xywh: `[0, 0, ${DEFAULT_PAGE_BLOCK_WIDTH}, ${DEFAULT_PAGE_BLOCK_HEIGHT}]`,
|
||||
},
|
||||
rootId
|
||||
);
|
||||
doc.addBlock('affine:paragraph', {}, noteId);
|
||||
// To make sure the content of new doc would not be clear
|
||||
// By undo operation for the first time
|
||||
|
||||
Reference in New Issue
Block a user