I have a button which starts an animation. What I want to do is restart the animation if the user pushes the button during an existing animation. The code below just stops the tween for a split second then continues the existing animation.
myTween = TweenLite.to(
circle,
1,
{
opacity: 0,
attr: {
r: 12,
},
ease: Power2.easeIn,
onStart: reset,
onComplete: reset,
onOverwrite: () =>
myTween
.restart()
}
)