@OSUblake for the case of Angular, I have the refresh in the OnInit hook method.
This is just after registering the plugins and before using the scrollTo plugin. A brief below.
ngOnInit() {
gsap.registerPlugin(ScrollTrigger);
gsap.registerPlugin(ScrollToPlugin);
ScrollTrigger.refresh(); // refresh here
...
gsap.to(window, {
scrollTo: { y: this.triggers[i].trigger, autoKill: false },
overwrite: true,
duration: 1,
ease: 'expo.out'
...
});
}
I am guessing the ScrollTrigger.refresh() worked for my case because the elements used with the scroll plugin are the triggers on my ScrollTrigger config.
For context, It is for the implementation I was assisted with here: