Jump to content
Search Community

ScrollTrigger position of elements nested inside another animation

kf420 test
Moderator Tag

Recommended Posts

I have an SVG timeline of sorts consisting of polyline and polygons indicating dates, and would like to animate each polygon into view as it enters the screen. Seems like a no-brainer with scrollTrigger, however it appears that start and end positions for each polygon are calculated incorrectly (as indicated by misaligned markers in CodePen), I'm assuming because the group containing polygons is already being animated in a separate tween with "scrub" setting set to true.

 

Is there any way to get an accurate position of each polygon in this scenario, or do I need to set it up differently?

See the Pen 834d4f7c23ed11e273be33bcf31c6556 by kf420 (@kf420) on CodePen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...