Hi, I'm using GSAP with ScrollMagic; animates according to scroll position.
My site is a single page app where:
Page A: has GSAP animation integrated with ScrollMagic; when user scrolls vertically from 0px to 100px, an image will enlarge to 2x at 100px scroll position.
Page B: has no GSAP.
When user scrolls vertically to say 100px, the image enlarged to 2x, then user clicks to navigate from Page A to B , i have to kill all events listening to prevent unintentional firing of Page A's event, and that include stopping all GSAP timeline/tween (via ScrollMagic's Controller.destroy())
The issue is: When user goes back to Page A, I re-init the GSAP timeline/tween. The vertical scroll position on Page A is now at 0px, but the image is already at 2x. So when user scrolls to 100px, the image is enlarged 4x (2*2).
Hence, my question is how to reset GSAP timeline/tween to the point where scroll position is 0px and where image size should be 1x and not enlarged to 2x?