Jump to content
Search Community

setcooki

Members
  • Posts

    1
  • Joined

  • Last visited

setcooki's Achievements

  1. I have a SPA react app in where i have several horizontal scroll triggers which are pinned to certain sections as wrapper. The problem is when i want to scrollY on the vertical to an element that is positioned after the last scrolltriggered section. The problem is the pin mode. What i do is disable and enable all scrolltriggers during scrollIntoView action. The problem on scroll complete (i tried the scroll with gsap.to and window.scrollTo and element.scrollIntoView), when i enable all the scrolltriggers again, the last scrolltrigger recognized the scrollbar having been moved beyond its start/end points and moves to the last position on the horizontal scroll . I think it has to do with the toggleActions: "play pause none reset". I would need to scrolltrigger somehow to tell to not do anything after .enable(false, false) call but it does because of the pin mode. I want to reset only if i move up over then end point again. So maybe disable or override the toggleActions or i have to manually enable/disable and remember the scroll position ... not sure what is the best way. I dont have a code pen as it is complex Any idea
×
×
  • Create New...