Can ZIM automatically rearrange rectangles in a wrapper to fit?

I'm making a tool that will let users design a form - they should be able to drag and drop different sized rectangles into one container.
Is it possible to build something that will find the best arrangement of the rectangles so they all fit? For example, if one rectangle is long and thin, it should be moved to one side so more rectangles can fit on the page.
I've been experimenting with wrappers and dragging objects around, but it's the automatically rearranging to fit the most rectangles in one space that is tricky. Is there a way ZIM helps with this before I try to code it manually?
Thanks!

Hello and welcome to the Forum! Are you thinking of something like ZIM Pack()?

https://zimjs.com/zim/pack.html

I was yes! Thanks so much, I knew I'd seen something like this when I used ZIM before, but couldn't find it. Thank you!

1 Like