Skip to content

Comments

fix: preserve toolbox scroll position when switching between sprites/the stage#10

Merged
gonfunko merged 1 commit intomodern-blocklyfrom
scroll
May 1, 2024
Merged

fix: preserve toolbox scroll position when switching between sprites/the stage#10
gonfunko merged 1 commit intomodern-blocklyfrom
scroll

Conversation

@gonfunko
Copy link
Owner

This PR preserves the toolbox scroll position when switching between editing targets. This is sort of best effort since the set of available blocks changes when doing this; if the topmost block in the toolbox still exists in the toolbox for the new target, it will appear at the same place at the top of the toolbox; otherwise the relative position within the current category is maintained. This broadly feels like the most correct approach, and seems to generally match what Scratch does. Note that this won't work until RaspberryPiFoundation/blockly-samples#2337 is published and we update to that version of the continuous toolbox.

@gonfunko gonfunko merged commit c8bc880 into modern-blockly May 1, 2024
@gonfunko gonfunko deleted the scroll branch May 1, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants