05-19-2018 19:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-19-2018 19:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
It seems to me that mixed-text components calculate their layout (ie, element sizes and positions) when first instantiated in .gui, but not dynamically in response to changes made via .js. For example, if a mixed-text is initialised in .gui with #copy/text that takes one line to display, changing the text in .js to a longer string will only display the topmost line of the new text. This is independent of the buffer-length value.
The reverse situation also applies: if the component is initialised with a long string which is subsequently replaced with a short one, the component leaves unnecessary blank space.
This makes it difficult to use a mixed-text to make a reusable popup dialog box.
If I'm right about this, could mixed-text please be modified to update its layout whenever any relevant attributes are changed?
Gondwana Software
06-01-2018 12:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-01-2018 12:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You could try sending one of the events after changing the text.
One of these might work:
yourelement.sendEvent({ type: 'EVENT_NAME' }); yourelement.animate('EVENT_NAME'); yourelement.state = "EVENT_NAME";
Here's the list of event names: EVENT_NAME
activate, click, collapse, disable, enable, expand, highlight, load, mousedown, mousemove, mouseout, mouseover, mouseup, paint, reload, select, unhighlight, unload, and unselect
06-01-2018 17:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-01-2018 17:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Welcome back, Jon!
Thanks for the suggestion. I tried all of those events on both the mixed-text and copy/text elements, but nothing triggered a re-layout.
Here's an example of what happens if the copy/text is changed from a one-liner to a longer string (the full sentence):
Here's what it should look like (and DOES look like if the .gui string is three lines long):
I feel that setting the copy/text.text in javascript should automatically trigger a re-layout.
Gondwana Software
06-27-2018 00:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-27-2018 00:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
A little more info on this bug: the layout IS recalculated whenever the display comes back on. As a result, the layout can vary before and after the display cycling, leading to bizarre inconsistencies—all without the execution of any app code.
This was a major pain to fault-find!
Since it's obviously possible for mixed-text components to recalculate their layouts after javascript-based changes, could I urge that this be done whenever the content changes rather than just whenever the display comes on.
Gondwana Software
07-18-2022 17:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-18-2022 17:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
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?
