Share Posted January 27 I have a problem when using the scrolltriger outside of the OwnScroller class, when scrolling the ScrollTrigger has a glitch, but when I install it into the OwnScroller class, the scrolltriger is fine, how do I fix this? See the Pen zYLaGXE by adeivan (@adeivan) on CodePen Link to comment Share on other sites More sharing options...
Share Posted January 27 Hi there - Looks like you're trying to pin elements using position 'fixed' inside a transformed container. This isn't a GSAP bug - just a browser limitation. You can use pinType: 'transform' to fix this. Also just a heads up that we have our own scroll smoothing plugin that works around a lot of annoying edge cases and browser bugs. https://greensock.com/scrollsmoother/ 2 Link to comment Share on other sites More sharing options...
Author Share Posted January 28 I have added pinType : tranform but when scroll like jelly: See the Pen zYLaGXE by adeivan (@adeivan) on CodePen this is when I put the scrolltrigger code into thisScroll(), the scrolltrigger can run perfectly: See the Pen bGjKmEQ by adeivan (@adeivan) on CodePen but how to make the scrolltrigger work properly like it does in thisScroll()? Link to comment Share on other sites More sharing options...
Share Posted January 28 Sorry, but it's very difficult for me to understand what you're asking. It looks like you're using a very old version of a basic ScrollSmoother that isn't full-featured. Is there a reason you're not using ScrollSmoother? We can't really support limited implementations like this one. If you're still having trouble, please make sure you make it extremely clear what the problem is what what you want to have happen, like: A clear description of the expected result - "I am expecting the purple div to spin 360degrees" A clear description of the issue - "the purple div only spins 90deg" A list of steps for someone else to recreate the issue - "Open the demo on mobile in IOS safari and scroll down to the grey container" A minimal demo - if possible, using no frameworks, with minimal styling, only include the code that's absolutely necessary to show the issue. Please don't include your whole project. Just some colored <div> elements is great. Link to comment Share on other sites More sharing options...
Solution Author Solution Share Posted January 28 1 hour ago, GSAP Helper said: Sorry, but it's very difficult for me to understand what you're asking. It looks like you're using a very old version of a basic ScrollSmoother that isn't full-featured. Is there a reason you're not using ScrollSmoother? We can't really support limited implementations like this one. If you're still having trouble, please make sure you make it extremely clear what the problem is what what you want to have happen, like: A clear description of the expected result - "I am expecting the purple div to spin 360degrees" A clear description of the issue - "the purple div only spins 90deg" A list of steps for someone else to recreate the issue - "Open the demo on mobile in IOS safari and scroll down to the grey container" A minimal demo - if possible, using no frameworks, with minimal styling, only include the code that's absolutely necessary to show the issue. Please don't include your whole project. Just some colored <div> elements is great. Sorry about that, I'm just trying to learn without using plugins, in the code I only want the scrolltrigger to run outside the class OwnScroller or onLoad() code, therefore I am confused why the scrolltrigger cannot run perfectly like I put the scrolltriger code inside onLoad(). Update : Solution found, thanks in advance 1 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