diff --git a/src/Tween.js b/src/Tween.js index c136a8ea..8b498a9a 100644 --- a/src/Tween.js +++ b/src/Tween.js @@ -76,6 +76,9 @@ } this.reset(); + + // add Reset event handler after initial reset is fired + this.onReset = config.onReset; }; // start/diff object = attrs.nodeId.tweenId.attr @@ -172,6 +175,11 @@ that.onFinish(); } }; + tween.onReset = function() { + if (that._isLastTween(tween) && that.onReset) { + that.onReset(); + } + }; }, /** * play @@ -596,4 +604,4 @@ return c * t / d + b; } }; -})(); \ No newline at end of file +})();