Jump to content
Search Community

jfudman

Business
  • Posts

    6
  • Joined

  • Last visited

Posts posted by jfudman

  1. I am programmatically moving an element inside of a pinned trigger to the center of the viewport via scrolltrigger with timeline animations.

     

    It works, but values do not properly update on resize. I'm setting values with anonymous functions, i even read through this post... but I'm still stuck. What's worse is `invalidateOnRefresh` is breaking some values (see codepen).

    Finally, I have to refresh the tl.scrollTrigger in order to use the tl.scrollTrigger.start value. Does anyone know why?

     

    See the Pen poQEWKZ by jfudman (@jfudman) on CodePen

  2. @ZachSaucier , I think @Prodesigner was pointing out that your pen that you posted on Jan 17, 2020 does not snap on drag.

    On 6/1/2020 at 4:21 PM, Prodesigner said:

    Well in first post, we have "snap to" slide, in Your pen is something like free swipe

     

    In your pen just change the line of code:

    x: x => gsap.utils.snap(Math.round(x / slideWidth) * slideWidth)

    to something like this

    x: x => gsap.utils.snap(slideWidth, Math.round(x / slideWidth) * slideWidth)

     

    • Like 1
    • Thanks 1
×
×
  • Create New...