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