How to restore a view back to its original position via animation?

Width is restoring, but font size is not
That’s because you have a wrong case there:

fontsize:"10px",

should be:

fontSize:"10px",

And also replace “10px” with “100%” if you want to restore initial font size