Open lazarus2019 opened 1 year ago
@lazarus2019 looking at it now, looks like you can use the renderSettings
prop on the <Lottie />
component:
<Lottie
lottieRef={lottieRef}
animationData={scrollLottieReveal}
autoplay={false}
rendererSettings={{
preserveAspectRatio: "xMidYMid slice",
}}
/>
@lazarus2019 I created a helper function to help with this, changing the
preserveAspectRatio
attribute helped with the lottie size on resize:Then I just call it inside a useEffect:
Works for me