Jump to content
GreenSock

alexbrt

ShockinglyGreen
  • Posts

    6
  • Joined

  • Last visited

About alexbrt

alexbrt's Achievements

  1. @Cassie, thanks for the alternative route. While it works, it makes it harder to handle both animating and manually scrolling at the same time. @GreenSock Jack, this is certainly better, though I'm still noticing the old behavior when clicking the add button while scrolling.
  2. Update, here is the CodePen. I would expect that clicking the button adds a new element and scrolls the page back to the first section. https://codepen.io/alexbrt/pen/ExErBez
  3. Hi all! I am currently working on a SPA in which I use a ScrollSmoother instance to synchronize the window's scroll with some WebGL elements, and I also use ScrollTrigger to pin sticky elements. A section of this website has a filtering system which dynamically adds / removes items from the DOM. After the DOM updates, I call ScrollTrigger.refresh() to recalculate the positions and then ScrollSmoother.scrollTo() to scroll back to the top of the section which is always present in the DOM. The pinned items' positions are correctly recalculated; however, the ScrollSmoother.scrollTo() call does nothing unless I delay it (via a setTimeout()). I was wondering if you guys know off the top of your heads when it is actually safe to call ScrollSmoother.scrollTo() after updating the DOM. I will try later today to reproduce the issue on a CodePen, though I couldn't help but pop the question now because it's currently really late in my time zone. Many thanks!
  4. Oh, I see! Thank you so much @mikel!
  5. Hello guys! While trying out a series of patterns to orchestrate independent animations with reusable tweens, I realized that only adding callbacks to a timeline will not update the timeline's duration even if using the position parameter. Although I did not end up doing the above, I thought I might as well share with you guys to see if it is in fact intended behavior.
×