chenglou / react-tween-state

React animation.
Other
1.74k stars 70 forks source link

Question: Multiple simultaneous transitions #37

Closed dey-dey closed 9 years ago

dey-dey commented 9 years ago

One of my main problems with CSSTransitionGroup is that it doesn't handle simultaneous transitions.

ie ...transition: left .2s ease-in-out, top .5s ease-in-out...

I suppose this takes care of it?

 this.tweenState('left', {
      easing: tweenState.easingTypes.easeInOutQuad,
      duration: 200,
      endValue: 100
 });
 this.tweenState('top', {
      easing: tweenState.easingTypes.easeInOutQuad,
      duration: 500,
      endValue: 200,
      onEnd: endCallback
 })
chenglou commented 9 years ago

Yes it does. Also, there will be a better API coming soon for transitioning every values in a collection, so that'll spare you from declaring this twice =).

dey-dey commented 9 years ago

@chenglou thanks for the answer!