Hello.
Firstly, I beg a pardon for my JS knowledge.
Secondly, for the English...
So. I've got the 3-step animation of the object in 3 sections. I've illustrated it in codepen and simplified a little - in real dev version not only y-axis movement implemented.
If i refresh or load page above these 3 sections, everything works fine. All 3 steps works as it should be.
But.
If load/refresh lower, or on the second, or third section - animation doesn't work properly backwards... Especially on the first part of the animation - "The Item" doesn't get right coordinates.
I hope that codepen version and my explanations would be enough to see the mistake. If not - I will upload site from offline to my test server and give a link.
Thank's for the help in advance!