DannyAgent
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by DannyAgent
-
-
Hi,
I've been using ScrollTrigger.matchMedia and wanted to pass in a dynamic variable for the media values. Example below.
[`(min-height:${footer.offsetHeight)`]: function(){ },
This seems to work fine initially but starts to go wrong when resizing the screen.
My question is, is there a way to update the dynamic value of the matchMedia query when a screen is resized or are these values set on load? I have a custom window resize event listener where I initiate ScrollTrigger.refresh() manually, which works as intended for the associated triggers with invalidateOnRefresh. Would be great to find out if there is something similar for matchMedia.
-
1 minute ago, DannyAgent said:
Hi, I'm having this issue with version 3.10.4.
When scrollTrigger is triggered immediately on the page, the delay property does not work. When the trigger is executed on enterBack, the delay does work.
Any ideas?
Sorry, literally a minute after submitting this I have found what causes it. If using "invalidateOnRefresh:true" on the scrollTrigger, the delay does not work as stated above. I removed this property from scrollTrigger and the delay now works. Not sure if this is intended behaviour or not.
Thanks.
-
Hi, I'm having this issue with version 3.10.4.
When scrollTrigger is triggered immediately on the page, the delay property does not work. When the trigger is executed on enterBack, the delay does work.
Any ideas?
Dynamic variables for ScrollTrigger.matchMedia values - way to update on screen resize?
in GSAP
Posted
Yes, you interpreted my question correctly, sorry I might not have done the best job of explaining that.
Okay that makes sense now. Thanks for your help.