Thanks for the reply. I took a look at the Epic Arpeggiator, it’s nicely done, a great tool! But it seems to me that you’re not facing the same problem as I. Your aligners are horizontal but your dynamic content is vertical so the aligners will never need to realign (or resize). In my case I have a vertical aligner with vertical dynamic content. The aligner is realigning it’s content to a dynamic size of other racks and doesn’t reduce in size.
What’s happening when we resize()? If I understand the API correctly we’re targeting an id of the outermost rack and asking it to regenerate it’s size according to it’s children’s collective size. For children that are racks with an undefined size, the sizes will also be regenerated, probably via resize() as a recursive function. Which would explain why aligners do not resize when resizing their container rack (because aligners don’t have a resize() method in the first place).
Then again I don’t understand why content is automatically resized when it grows but not when it shrinks? (maybe taktik has an answer?)
But a fix for my problem can be done, so maybe this isn’t such a big issue.
For this example:
The container is a rack (vb:column, vb:row)
The content is any ViewBuilder object
The aligner is a vertical_ or horizontal_aligner
- remove the aligner from it’s container
- remove the content from the aligner
- resize the container
- create a new aligner with the content (this aligner has now no size)
- reattaching the new aligner to the container.
This will force the aligner to regenerate it’s size to the reduced available space after resize.
I think it would be better to have aligner:resize() but a hack will have to do for now.