Jump to content
Search Community

update getBoundingClientRect().top onResize

gregor test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

thank you you are my hero;)

and with your clever calculation, the resizing event is no longer necessary.

 

the invalidateOnRefresh: true is enough, means that the scrolltrigger already listens to resize events by default?

But I will definitely give Flip Plugin a try

Link to comment
Share on other sites

Sorry to bother you again. But can I ask you if you have any idea why the calculations don't work when I add an animation to the timeline that happens before the image is resized?

See the Pen LYvPJEv?editors=1011 by destroy90210 (@destroy90210) on CodePen

 

I played around and got it to work on initial load with when I use a short setTimeout, but resizing is broken again

See the Pen oNOXNzW?editors=1011 by destroy90210 (@destroy90210) 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...