mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(whiteboard): editor init size when creating new editor
This commit is contained in:
@@ -18,6 +18,7 @@ export class EditorTool extends BaseTool {
|
||||
const {
|
||||
currentPoint,
|
||||
currentGrid,
|
||||
editorShapeInitSize,
|
||||
settings: { showGrid },
|
||||
appState: { currentPageId, currentStyle },
|
||||
document: { id: workspace },
|
||||
@@ -47,6 +48,7 @@ export class EditorTool extends BaseTool {
|
||||
? Vec.snap(currentPoint, currentGrid)
|
||||
: currentPoint,
|
||||
style: { ...currentStyle },
|
||||
size: [editorShapeInitSize, 200],
|
||||
workspace,
|
||||
});
|
||||
// In order to make the cursor just positioned at the beginning of the first line, it needs to be adjusted according to the padding newShape.point = Vec.sub(newShape.point, [50, 30]);
|
||||
|
||||
Reference in New Issue
Block a user