Container align mode question

I have a container called main set to align mode top-to-bottom. It has two children that are both fixed width 800. the second child has an element whose x position is momentarily negative. This causes main to shift its layout to accommodate the second child. What’s the best technique to keep using align top-to-bottom but to also allow part of the second child to fall out of visibility? The crop modes don’t seem to do the trick either.
comp_layout_question.1.toe (4.66 KB)

in ‘main/container/scrubber’ i added a math CHOP right before the null. on the common page set scope to ‘x’ and on mult-add page set post-add to the expression:

+ abs(op('merge1').chan(1)) if op('merge1').chan(1) < 0 else 0

so if that value drops below zero, it will add it back and the position will stay at 0.

you could also do your math a little differently. subtract the width of the buffer bar from the width of the ‘main’ panel, then multiply it by the output of the speed CHOP.

Thanks for the suggestion. It’s not the strictest style, but I would also consider doing a scoped limit chop with a clamp between 0 and some very large number 9999999.

But the problem with both of these approaches is that you never have a moment where only half of the scrubber is visible. When the scrubber is wider, this is a more noticeable problem, as in what I’ve attached. The scrubber is momentarily motionless while its x value is negative and then clamped to 0. I’m looking for a simple way to have part of the scrubber off-screen. I hope that clarifies.
comp_layout_question.2.toe (4.72 KB)

Is it necessary for the scrubber to be made of a panel?

here’s a version using a simple GLSL TOP

You can adjust the size of the scrubber in the constant CHOP in /main/container2. pulsing the speed CHOP doesn’t cause any offset, and the scrubber moves halfway off the screen at 0 and 1.

there may be a way to do this without GLSL, but if it does the trick it’s not terribly complicated.

does that look more like what you’re after?
glsl_scrubber.1.toe (5.71 KB)

you could also do this with a rampTOP and a custom keys DAT. I tried using a series of tables and evals and merges, but it gets messy fast, so I used a scriptDAT instead. it would be nice to figure out a way without scripting, but at least Python is a bit more accessible than GLSL.
ramp_scrubber.4.toe (5.71 KB)

If I understand correctly. the ‘scrubber’ op is overflowing over the bounds of ‘container2’ causing ‘main’ to push over ‘container2’ to fit everything in from left to right

do this:

op(‘main/container2’).par.crop = 1

this tells ‘container2’ to crop out anything that overflows so ‘main’ will not move it.

That’s like 10x simpler than my solutions lol. But you could make some pretty tricked out scrubbers in GLSL!

K.I.S.S.