heygrady / transform

jQuery 2d transformation plugin
437 stars 87 forks source link

Weird non-linear movement *first time* when scaling #29

Closed geon closed 9 years ago

geon commented 12 years ago

I had a strange issue when running an animation the first time after every page load. I was animating the scaling and left/top properties of an element (using the same .animate call). The element would end up in the right place, but moved there in a curve instead of along a straight line.

This would happen consistently on the first run after refreshing the page. I noticed the element would be left with an extra attribute after the first run, like:

 data-transform="origin(0px, 0px) scale(1, 1)"

Adding that in the HTML fixed the problem.

I was not able to reproduce the problem in a small example for now.