Skip to content

Commit b46fd23

Browse files
committed
Always enable wrapping in tldraw 2 text tool
Disabling wrapping puts the text rendering into single-line ellipsised mode (intended for frame labels), which stops someone from being able to manually break lines by pressing enter. (Only the first line will be shown) Always allow wrapping (which is the default) for the text tool.
1 parent bfe553c commit b46fd23

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • bbb_presentation_video/renderer/tldraw/v2/shape

bbb_presentation_video/renderer/tldraw/v2/shape/text.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,8 @@ def finalize_text(
6060
ctx.push_group()
6161

6262
width = None
63-
wrap = False
64-
if not shape.auto_size:
65-
wrap = True
66-
if shape.size.width > 0:
67-
width = shape.size.width
63+
if not shape.auto_size and shape.size.width > 0:
64+
width = shape.size.width
6865

6966
layout = create_pango_layout(
7067
ctx,
@@ -73,7 +70,6 @@ def finalize_text(
7370
FONT_SIZES[style.size],
7471
width=width,
7572
align=shape.align,
76-
wrap=wrap,
7773
letter_spacing=None,
7874
)
7975
layout.set_text(shape.text, -1)

0 commit comments

Comments
 (0)