Jump to content
Search Community

Anastasio

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Anastasio's Achievements

  1. Yes, my codepen works fine. Anyway in the original code the gsap matchmedia is created inside a useMemo, so based on my knowledge, it won't be re-created on every render. I've moved the timeline's creation inside the useLayoutEffect but the result is the same.
  2. Hello there, i'm developing a site using astro and react, and i'm facing some issues. I have a component that uses matchmedia and a timeline with scrolltrigger to pin the component itself. When i render two of this component, the second one sometimes starts at the first section's pin spacer start as you can see below: Here how it should be: I solved this delaying the adding of second component's animation to matchmedia, setTimeout(() => mm.add(conditions, scrollAnimation), delay) but i don't really like this solution. In the codepen i don't have this problem. the second issue is when i refresh the page this strange behaviour happenings: registrazione-schermo-2023-02-18-alle-160044_qtcI2nXd.mp4 There is a way to prevent this? Thank you all.
  3. Hi @OSUblake! I've just updated gsap to 3.10.3 and it works as expected! No resize issue anymore, thank you!
  4. Oh i think this might help, but i've found out a solution by myself, thank you anyway! I have another weird behavior; when the window has been scrolled and after resized, the start and end point of scroll trigger breaks. A temporary solution, i used to manage the issue, is to add a resize event listener and when window is resized i disable and re-enable the scroll trigger. This works, but every time i resize the window scroll to the top. I already tried to use .refresh() but this doesn't help.
  5. Thank you, but this example have sections with full width, my sections have dynamic width, you can't know how much larger they will be.
  6. Hello there. i'm a gsap newbie and this is my first post on gsap forum, thank you in advance for your help. I have horizontal container, that can simulate horizontal scroll, with dynamic sections that not have defined width and normal vertical sections. I've spent a lot of time trying to implement navigation between horizontal and vertical sections with anchor links but i haven't no results. The example here https://codepen.io/akapowl/pen/XWMxLGN/a82e21f8d9c7bce0059159ced099666d seems to not work for me. Someone can help me to make it work?
×
×
  • Create New...