In the current implementation, when the to vars are changed, the TweenLite animation is invalidated. This, however, may cause undesired behavior when adjusting the to vars as a result of making the animation responsive.
For example, imagine you are using from: {x: 0, y: 0} and to: {x: 50, y: 25}. However, if you resize the screen (or with any other condition), you want to to be {x: 25, y: 50}, the current process of updating the to values will be equivalent of also updating from to the current position of the animation.
The following image should help understand the situation I'm describing.
What I am suggesting is a prop which will toggle between the default behavior and the behavior I'm trying to achieve.
I will be forking this repository and working on this change because it is something I need rather urgently. If, when it's finished, it looks like something worth merging into this package, I will gladly open a pull request.
In the current implementation, when the
to
vars are changed, the TweenLite animation is invalidated. This, however, may cause undesired behavior when adjusting theto
vars as a result of making the animation responsive.For example, imagine you are using
from: {x: 0, y: 0}
andto: {x: 50, y: 25}
. However, if you resize the screen (or with any other condition), you wantto
to be{x: 25, y: 50}
, the current process of updating theto
values will be equivalent of also updatingfrom
to the current position of the animation.The following image should help understand the situation I'm describing.
What I am suggesting is a prop which will toggle between the default behavior and the behavior I'm trying to achieve.
I will be forking this repository and working on this change because it is something I need rather urgently. If, when it's finished, it looks like something worth merging into this package, I will gladly open a pull request.