Scrolltrigger issue

hi
I have a problem that i can’t solve : the scrolltrigger work when the window is resized

see here

@daniel hi can you help me ? i’ve tried to figure this out but with no success :confused:

Hi there :slight_smile:

this is intended behaviour. Imagine you have some content that’s revealed on scroll but before the user gets to that section, he resizes his window to half the size for whatever reason. The resize might have caused the layout to change = ScrollTrigger calculations are now incorrect since elements are in a different place. Same thing if somebody were to flip his phone into landscape view for example, without refreshing the triggers, animations would likely appear broken.

So on resize, we refresh the ScrollTriggers for them to re-calculate the correct positions of elements. A non-dev user likely also won’t keep slightly resizing the window over and over again :wink: Hope that makes sense :slight_smile:

Thank you for your answer. i did a window recalculation via a JS node at the end of the first timeline