AugustRush / Stellar

A fantastic Physical animation library for swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scaleXY doesn't work as expected

apouche opened this issue · comments

Unless the library works differently it is ususally expected that a scale of 1 always return the identity matrix scalling column back.

However here with Stellar (and thanks for you great work btw), this not the case.
A simple exemple with

myView.scaleXY(0.9,0.9).animate()
// later on: 
myView.scaleXY(1.0,1.0).animate()

shows that the scaling factor of 1.0 leave the scale of the view unchanged.
And changing the second call to myView.scaleXY(1.1,1.1).animate() doesn't return the view to its original scale either (that, I have trouble understanding).

If you have any question regarding this, let me know :)

Thank you for your support and feedback. In this library , 'scale' has some different with others, it depend on the previous step. in your situaration, you should use it like this:

myView.scaleXY(0.9,0.9)
             .then.scaleXY(0.9/1.0 , 0.9/1.0)
             .animate()

may be it should clearly understand if i add a new method called 'scaleXYTo(x,y)'

yeah that makes sense (although i think you mean 1.0/0.9 ;) )