Call onReset event when Tween resets to beginning

This commit is contained in:
Keldon Jones
2013-05-31 15:49:22 -06:00
parent 3cfd49a03e
commit 014d4df1f2

View File

@@ -67,6 +67,9 @@
}
this.reset();
// add Reset event handler after initial reset is fired
this.onReset = config.onReset;
};
Kinetic.Tween.tweens = {};
@@ -127,6 +130,11 @@
that.onFinish();
}
};
tween.onReset = function() {
if (that._isLastTween(tween) && that.onReset) {
that.onReset();
}
};
},
/**
* play
@@ -559,4 +567,4 @@
return c * t / d + b;
}
};
})();
})();