Jump to content
Search Community

Dev Mude

Premium
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Dev Mude

  1. Awesome, working now, thanks for that!

     

    I had to wrap the following code (see my earlier codepen):

    snapTriggers.forEach((trigger, i) => {
      snaps[i] = (trigger.start - self.start) / distance
    })

    In a setTimeout:

    setTimeout(() => {
      snapTriggers.forEach((trigger, i) => {
        snaps[i] = (trigger.start - self.start) / distance
      })
    }, 0)

    Otherwise after screen resize, the text wouldn't align properly with the boxes. Not sure if this is a user error or a library error, but just letting you know.

     

    Cheers

×
×
  • Create New...