Hi I have a problem with window resize and getBoundingClientRect().top.
Resizing only works if the animation has not started yet, but if the animation of the tile has started and I resize the yPos gets not updated...
I created a small demo here
any ideas what I'm doing wrong?
See the Pen LYvPJEv?editors=1010 by destroy90210 (@destroy90210) on CodePen
I got it somehow running. the trick was to check if the animation has started or not and use different calculations for the yPos,
See the Pen XWQbdOv?editors=0011 by destroy90210 (@destroy90210) on CodePen
Not sure if this is best practise but it works