Best way to refresh continuous toolbox in latest Blockly?

12 views
Skip to first unread message

Sardorbek Omonkulov

unread,
2:29 PM (8 hours ago) 2:29 PM
to Blockly

Hi Blockly team! We’re migrating from an older Blockly to the latest version. We use a continuous (scratch-style) toolbox rather than displaying a single category at time. We are using the continuous-toolbox plugin. 

When we switch languages, we need the toolbox blocks to update as well. We found APIs that refresh the selected category (e.g. refreshToolboxSelection), but in a continuous toolbox users can scroll without clicking a category button, so that doesn’t reliably refresh what’s on screen. 

Our current workaround is rebuilding the whole toolbox but that resets scroll position and dropdowns of all the blocks in the toolbox.

Is there a recommended approach to refresh the entire continuous toolbox contents without rebuilding or a best-practice way to rebuild while preserving scroll/UI state?

Thanks in advance!

Reply all
Reply to author
Forward
0 new messages