I have an issue where when I try and pin an element that contains a Lottie file it never calculates it’s height properly. I think the issue is that the Lottie file uses a custom element that creates the markup that dictates its height when it is connected to the document, however when pinning the element is connected multiple times while it gets wrapped in the pin-spacer div and it doesn’t render until after scrollTrigger has done it’s calculations.
I have tried using ScrollTrigger.r
Hi beavykins,
It's hard to advise without seeing a minimal demo, but there is helper function for using Lottie with ScrollTrigger.
https://greensock.com/docs/v3/HelperFunctions#lottie
See the Pen QWdjEbx by GreenSock (@GreenSock) on CodePen