aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/DocUtils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-29 13:39:16 -0400
committerbobzel <zzzman@gmail.com>2024-10-29 13:39:16 -0400
commit1a444532d026a208817c6997f00022a3e09ead23 (patch)
treef5bc8a9dda9b3c9b80700930398a9664acad6115 /src/client/documents/DocUtils.ts
parent63f9f9573dab9745d2f570e1917b325a474fdd93 (diff)
fixes to allow typing and drawing without a mode switch.
Diffstat (limited to 'src/client/documents/DocUtils.ts')
-rw-r--r--src/client/documents/DocUtils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts
index e3cb5e72c..dae3e48ad 100644
--- a/src/client/documents/DocUtils.ts
+++ b/src/client/documents/DocUtils.ts
@@ -678,8 +678,8 @@ export namespace DocUtils {
...(defaultTextTemplate
? {} // if the new doc will inherit from a template, don't set any layout fields since that would block the inheritance
: {
- _width: width || 200,
- _height: BoolCast(Doc.UserDoc().fitBox) ? 70 : 35,
+ _width: width || BoolCast(Doc.UserDoc().fitBox) ? Number(StrCast(Doc.UserDoc().fontSize).replace('px', '')) * 1.5 * 6 : 200,
+ _height: BoolCast(Doc.UserDoc().fitBox) ? Number(StrCast(Doc.UserDoc().fontSize).replace('px', '')) * 1.5 : 35,
_layout_centered: BoolCast(Doc.UserDoc()._layout_centered),
_layout_fitWidth: true,
_layout_autoHeight: true,