kohlej Posted June 2, 2020 Share Posted June 2, 2020 Hi guys, here is a demo where I reproduced the problem. Markers of H1 element are off the same amount as the other section element above it changed it's height(padding top and bottom) before it. By markers I also mean the start and end point of actual animation. Any way to avoid this? PS. Thank you for creating this awesome plugin! It's awesome See the Pen OJMLKNp by artyor (@artyor) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted June 2, 2020 Share Posted June 2, 2020 Hey kohlej. In general it's not good to animate non-performant properties like height and padding. With that being said, if you change the position of an element with a ScrollTrigger you'll need to make ScrollTrigger refresh. onComplete: () => ScrollTrigger.refresh() 4 Link to comment Share on other sites More sharing options...
kohlej Posted June 2, 2020 Author Share Posted June 2, 2020 49 minutes ago, ZachSaucier said: Hey kohlej. In general it's not good to animate non-performant properties like height and padding. With that being said, if you change the position of an element with a ScrollTrigger you'll need to make ScrollTrigger refresh. onComplete: () => ScrollTrigger.refresh() Hi, I will try to acomplish it with this. Yes Im aware that manipulating height/padding is not the ideal, but it was some unique animation I wanted to create. Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now