micha-lmxt / svelte-motion

An animation library for Svelte based on framer-motion.
https://svelte-motion.gradientdescent.de
MIT License
595 stars 15 forks source link

Noticing a 1 pixel shift during animation... #20

Open rchrdnsh opened 2 years ago

rchrdnsh commented 2 years ago

Hi! XD

Made a REPL animating grid-row on 3 elements...

https://svelte.dev/repl/41f41bce444c4c52b771ba66d7043c19?version=3.48

...and it works pretty well, except that when the animation is occurring I notice that the elements exhibit a subtle shift in width by maybe 1 or 2 pixels, then return to their original width again...

...it also seems as if the border-radius gets a little malformed as well, like it's gets elongated or something...

...it's small, but a little annoying...I wonder if there is anything that can be done, or if I am doing something incorrect...

Thank you!

micha-lmxt commented 2 years ago

I believe the issue it's that the scale correction (https://svelte-motion.gradientdescent.de/layout) is not working correctly at the moment. I try to fix but it is tricky.