Skip to content

Commit af1a21f

Browse files
authored
Merge pull request #3 from makermelissa/main
Fix description of text_maxlen
2 parents a698928 + eeacab6 commit af1a21f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

adafruit_magtag/magtag.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def add_text(
119119
text_position=(0, 0),
120120
text_font=terminalio.FONT,
121121
text_color=0x000000,
122-
text_wrap=False,
122+
text_wrap=0,
123123
text_maxlen=0,
124124
text_transform=None,
125125
text_scale=1,
@@ -134,9 +134,10 @@ def add_text(
134134
example.
135135
:param text_color: The color of the text, in 0xRRGGBB format. Can be a list of colors for
136136
when there's multiple texts. Defaults to ``None``.
137-
:param text_wrap: Whether or not to wrap text (for long text data chunks). Defaults to
138-
``False``, no wrapping.
139-
:param text_maxlen: The max length of the text for text wrapping. Defaults to 0.
137+
:param text_wrap: When non-zero, the maximum number of characters on each line before text
138+
is wrapped. (for long text data chunks). Defaults to 0, no wrapping.
139+
:param text_maxlen: The max length of the text. If non-zero, it will be truncated to this
140+
length. Defaults to 0.
140141
:param text_transform: A function that will be called on the text before display
141142
:param int text_scale: The factor to scale the default size of the text by
142143
"""

0 commit comments

Comments
 (0)