enable transition for transform property

The code i've written above may not beauty, but it works well for me in every project, but you got the idea. please let me know if you have another efficient and beauty solution for this