microbit-more / mbit-more-v2

Full-functional extension of micro:bit for Scratch3
MIT License
32 stars 21 forks source link

How does the Scratch editor implement block area folding? #22

Closed Evolution-detector closed 1 year ago

Evolution-detector commented 2 years ago

Hello, esteemed author. I really like to use your micro:bit more extension. In the demo page you provided, I found an excellent feature: unlike MIT Scratch, the blocks section of your editor can be automatically collapsed and displayed fully again when the mouse is moved over the blocks. After using it for a while, I found that this collapse feature does not make dragging operation difficult, but very smooth and convenient. I would like to ask you how this feature is implemented? image

yokobond commented 2 years ago

This feature is implemented in Xcratch, on which MicroBitMore is based. Xcratch achieves the folding by modifying the css of the original LLK/scratch-gui.