Skip to content

Commit 31c664c

Browse files
authored
Merge pull request #29 from slootsky/feature/return_index_of_textbox
return the index of the textbox created by add_text
2 parents fed451c + 110dcb1 commit 31c664c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adafruit_magtag/magtag.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ def add_text(
182182
self._text_anchor_point.append(text_anchor_point)
183183
self._text_is_data.append(bool(is_data))
184184

185+
return len(self._text) - 1
186+
185187
# pylint: enable=too-many-arguments
186188

187189
@staticmethod

0 commit comments

Comments
 (0)