06-24-2018 05:22
06-24-2018 05:22
Ok so:
https://dev.fitbit.com/build/guides/user-interface/svg/
Dynamic Text Area: " you change the text content, the element height will automatically re-adjust."
This is false. I have created a Dynamic text element and when I change the text via:
document.getElementById('text').text="Some text"
The height stays the same as whatever it was before. I have tested this with varying amounts of text. The height never changes.
Is there a way to "refresh" or "reload" the dynamic text area so that it operates as advertised?
06-29-2018 15:34
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
06-29-2018 15:34
It seems like you need to set the `text-length` attribute to a value large enough for the string.
.someTextField { text-length: 1024 }
or
<text text-length="1024" />
Best Answer06-29-2018 15:45
Gold Fitbit Product Experts share support knowledge on the forums and advocate for the betterment of Fitbit products and services. Learn more
06-29-2018 15:45
The issue may be related to this. For a giggle, try turning off the display after you've changed the text, and then turn it back on (letting auto-off do its thing should be sufficient). See if that results in a layout update.
07-18-2022 17:22
07-18-2022 17:22
Since the post is more than four years old I wonder if the issue still hasn't been fixed?
I am developing on a Fitbit Sense using the SDK 6.1.0 and following https://dev.fitbit.com/build/guides/user-interface/svg/#dynamic-textarea
I have still have the same problem that the textarea is NOT resized after changing its text from JS.
Is there a workaround?
Best Answer