Share Posted January 24, 2022 I use ScrollTrigger to pin an element: const trigger = ScrollTrigger.create({ trigger: q('#map-pin-trigger'), start: '-=48px top', end: 'bottom center', pin: q('#map-container'), // markers: true, }) However, once I scroll to the end of the trigger & it unpins, the subsequent element would be covered up by the previous unpinned item (it goes under the previous item), it looks like this (part in red square shouldn't cover up the chart): I added a CodePen demo. Any advices would be appreciated. Thanks. I feel it has something to do with pinSpacing but I couldn't make it work. If you could help me understand why this could happen that'll be great too! See the Pen YzEXVzW by noahsong (@noahsong) on CodePen Link to comment Share on other sites More sharing options...
Share Posted January 24, 2022 It's very hard to say what any ScrollTrigger issues are without a minimal demo. Thanks! Link to comment Share on other sites More sharing options...
Author Share Posted January 28, 2022 On 1/24/2022 at 5:25 PM, OSUblake said: It's very hard to say what any ScrollTrigger issues are without a minimal demo. Thanks! Hi @OSUblake, I just added a CodePen demo. Link to comment Share on other sites More sharing options...
Solution Solution Share Posted January 28, 2022 Thanks for demo. Very minimal and easy to understand! So I'm assuming you're looking for it to behave like this? I just needed to manually calculate the end value. See the Pen ExbjvOM by GreenSock (@GreenSock) on CodePen 2 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