Michal_Ant
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Michal_Ant
-
-
Thanks for super fast response!
I just installed the package and tested it.
Now it works, but still have issues with certain toggleActions values
function Component({delay}){ const target = useRef() useEffect(()=>{ gsap.registerPlugin(ScrollTrigger) gsap.to(target.current, {opacity: 1, visibility: 'visible', y:0, duration: 1, delay: delay, scrollTrigger: { trigger: target.current, start: "top 90%", toggleActions: "play none none none", // this works perfectly //toggleActions: "restart none none none", // this doesn't delay animation }}) },[]) return( <ContainerAnimated ref={target}> // ... other child components </ContainerAnimated> ) }
Would be greatful for any hint
*edited: delay value is comming from props and it is a number
-
Hey! Got the same problem with delay not working with ScrollTrigger and React, just like @Bornfight has discribed. Is there any chance that version 3.6.2 will appear on NPM ? I'd like to be consistent and stick to using modules. Cheers!
Problem: Delay property not working with SrollTrigger.
in GSAP
Posted
Thanks for help and explanation. Very appreciate!