Dynamic Resizing Height of Blocks

46 views
Skip to first unread message

Kyle Chin

unread,
Nov 27, 2023, 2:45:20 PM11/27/23
to Blockly
Hi!

I thought I posted a couple days ago but it's not showing up so maybe there was a connection error or something -- apologies if this is a duplicate!

I am trying to resize a block's height dynamically based on a user entered field input:
Screenshot 2023-11-23 at 11.08.43 PM.png
This is the default behavior, which I want to remain the default. Then, if the user changes the field value to a certain value, I want the "set item to" to collapse to minimum height, while the rest of the blocks pictured remain their height as pictured.

I've been playing around with different height settings for a few hours and can't seem to nail down where to update the height in the best place (my current best guess is `finalize_()` in `core/renderers/geras/info.ts`). My main issue is that if I adjust the height there, it also impacts the heights of the blocks to the left, which I do not want to happen.

Any help and guidance is greatly appreciated. Thanks!

Cheers,
Kyle
Reply all
Reply to author
Forward
0 new messages