Hi !
I'm new to GSAP, and I discover progressively the many possibilities of this great tool.
But after parsing the doc, I don't figure how to stop a repeated tween *at the end of a complete iteration*.
More precisely, I have some div jumping like that :
TweenMax.to($('#div1'), 1, {bottom: '200px', ease:Power2.easeOut, repeat: -1, yoyo: true});
And I would like to stop it (in reaction to some user event) at the end of the current jump (when on the floor).
I've tried to call kill() within a function attached to onRepeat, but with yoyo enabled, onRepeat is triggered twice a jump: at the end of the jump but also at the top of the jump.
Moreover, as a workaround, I thought to check the bottom property and call kill only if it is 0, but its value is never 0 (but some small numbers like 21px, 23px, ...).
Did I miss something ?
Many thanks in advance !