scratchfoundation / scratch-blocks

Scratch Blocks is a library for building creative computing interfaces.
https://scratch.mit.edu/developers
Apache License 2.0
2.57k stars 1.37k forks source link

How change the size of the toolbox containing the blocks ? #1878

Open jeremychamboultou opened 5 years ago

jeremychamboultou commented 5 years ago

How change the size of the toolbox containing the blocks ? For that : selection_039 Thank's in advance Jérémy

mfrtrifork commented 5 years ago

+1

mfrtrifork commented 5 years ago

@jeremychamboultou did you find a solution?

towerofnix commented 5 years ago

@mfrtrifork perhaps changing this file will work? I haven't tested but it's worth a shot. https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/core/flyout_vertical.js#L78-L82

mfrtrifork commented 5 years ago

@towerofnix I have already tried this and unfortunately this does not work. There is still a element in the blocklyFlyout svg which defines a width og 248px and is updated on scroll in the toolbox.

Could be cool if width could be modified with css and we can make a toolbox with adjustable width.

PhidgetsInc commented 4 years ago

I am also running into this issue with an extension I am working on. The blocks can be up to 700px long!

Ideally, it would be nice to have both a horizontal and vertical scrollbar on the toolbox/flyout.

PhidgetsInc commented 4 years ago

Temporarily (for me, at least), I have had to edit both these files.

https://github.com/LLK/scratch-blocks/blob/986f328eaa2532ec829a17ffe66c3d0c339511a9/core/toolbox.js#L87-L92

https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/core/flyout_vertical.js#L78-L82

Getting the ScrollbarPair working in the toolbox/flyout has proved to be much more in-depth than what I have time for.