I saw the "technique" (f.ex @jean-emmanuel mcu controller or different others) where you can automatically add clones for a channel strip in a matrix. Where the quantity property defines the number of clones. Very nice! This inspired me.
But in my case each of the clones has its own momentary width, depending on several options inside the channel strip. so, to avoid blank space, the left position of the current clone depends of the width from the other clones left of the current.
It works quite fine in a panel: If for ex clone 2 changes its width from 150px to 100px, all the following clones shift to the left automatically.
I think the picture describes what i mean:
sure. you are absolutely right. totally with you.
going to send you the details... give me a little time to remove at least the roughest embarrassments
Ok I think I understand the issue now, and I found a solution ! Since the width of a cloned widget is ignored by the clone itself we must find a way to reinject this information in a way that's still using the incremented data within the strip. The idea here is simply to have a widget (variable or whatever) in the strip that holds the width value and make sure its id depends on variables.n, then we use a tiny hack to define the clone's width in the matrix' props:
// inject "n" in the clone container
// using a unused property
props.comments = {n: $}
// make the clone's width depend on the variable widget in the incremente strip.
// Underscored @ { } syntax = interpreted at the child level instead of the matrix'
props.width = '@_{stripwidth_@_{this.comments.n}}'
Here is a minimal session that demonstrate this hack :