Share Posted October 29, 2020 Is there an obvious reason why this scrollTrigger animation JUMPS down into its initial location? I thought it might be the immediateRender.... but I've even tried setting it to true but it only fixes the scrolling into the start trigger.... when you scroll OUT of the start trigger it still jumps. Essentially, we placed an item in the ideal location with css. Then we want to setup a scrollTrigger animation that moves that item from just above its initial Y to just below its initial Y. gsap .timeline({ scrollTrigger: { trigger: container, scrub: true, start: 'top bottom', end: 'bottom top', markers: true, }, }) .fromTo( circle, { y: '+=100px', }, { y: '-100px', ease: 'none' }, 0 ) .fromTo( bubble, { y: '-=150px', }, { y: '+150px', ease: 'none' }, 0 ); Link to comment Share on other sites More sharing options...
Share Posted October 29, 2020 Hey iDVB. It's hard to say based on only the given information. Can you please create a minimal demo using CodePen? Also note that you can leave out the "px" in your y values if you want to. Link to comment Share on other sites More sharing options...
Author Share Posted October 29, 2020 Thanks @ZachSaucier, Ya working on an example now... but unable to replicate the issue so far. Link to comment Share on other sites More sharing options...
Author Share Posted October 29, 2020 Ok, Got it! This shows the issue... actually even worse, as it seems to even jump WAY down the page after the animation as well. https://codesandbox.io/s/admiring-lalande-qftns?file=/src/RedefinedAnimation.js Link to comment Share on other sites More sharing options...
Share Posted October 29, 2020 When I edit your demo to get rid of the unnecessary = and + operators the issue seems to go away. What did you have them for? https://codesandbox.io/s/eager-http-gyobf Link to comment Share on other sites More sharing options...
Author Share Posted October 29, 2020 Thought it was needed... but on closer inspection it appears not. We got it working this way now.... https://codesandbox.io/s/elegant-sammet-3dk9x?file=/src/RedefinedAnimation.js Thanks! 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