mattdesl / gsap-promise

promise wrapper for gsap (TweenLite)
MIT License
48 stars 10 forks source link

Cancellable animations #2

Closed cheapsteak closed 9 years ago

cheapsteak commented 9 years ago

Usage:

var animation;
var animateIn = function () {
  animation && animation.cancel();
  animation = animate.to(el, 0.8, {x: 100});
};
var animateOut = function () {
  animation && animation.cancel();
  animation = animate.to(el, 0.8, {x: 100});
};
mattdesl commented 9 years ago

pushed to 1.4.0

thanks :+1:

cheapsteak commented 9 years ago

:tada: