Share Posted October 29, 2020 Hey All, I've experiecing a weird issue with resizing. Once I've resized the window the scrub effect completely disappears with the element. Why does it happens and how could I fix that? Thanks in Advance. Regards See the Pen PozRPWx by victorwork (@victorwork) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted October 29, 2020 Hey Victor. If you start commenting out sections you can find that it's an issue with your .scrollerProxy() section. Adding the getBoundingClientRect() part from the scrollerProxy docs seems to fix it for me: See the Pen yLJKYGa?editors=0010 by GreenSock (@GreenSock) on CodePen 2 Link to comment Share on other sites More sharing options...
Author Share Posted October 30, 2020 @ZachSaucier Thanks for helping me out... I appreciate it. Seizing the opportunity... a quick question. Is there a way to fire a animation on ScrollTirgger before the elements enters on the viewport? Something like this: ScrollTrigger.batch(this.unwrapTexts, { onEnter: (elements) => { gsap.fromTo($(elements).find('.wrapped-p'), { yPercent: 140 }, { duration: 4, yPercent: 0, ease: 'expo.out', stagger: .06 }) }, start: 'top 110%', once: true }) Thanks in advance. Link to comment Share on other sites More sharing options...
Share Posted October 30, 2020 1 hour ago, Victor Work said: Is there a way to fire a animation on ScrollTirgger before the elements enters on the viewport? Sure. Is the code you provided not working for you? It'd be helpful if you provided a minimal demo if you'd like our help debugging. 1 Link to comment Share on other sites More sharing options...
Author Share Posted November 4, 2020 Hey @ZachSaucier Thanks, that works ... was a miss configuration on my end. Seize the same topic to dont flood the forum... Is there a way do get scrolling direction? For example.. detecting scrollup or scrolldown inside of a Scrub animation? Link to comment Share on other sites More sharing options...
Share Posted November 4, 2020 How about this? https://greensock.com/docs/v3/Plugins/ScrollTrigger/getVelocity() 2 Link to comment Share on other sites More sharing options...
Author Share Posted November 4, 2020 Let me check it out and see how I can play and get back with a feedback. Thanks for now @GreenSock Jack 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