Bug 1122435 - Part 2: Stop auto-refreshing AnimationPlayerActor's state when the animation has ended. r=miker

This commit is contained in:
Patrick Brosset 2015-01-16 01:42:00 -05:00
parent 2408a0aabb
commit b12a938674

View File

@ -339,6 +339,11 @@ let AnimationPlayerFront = FrontClass(AnimationPlayerActor, {
return;
}
// If the animationplayer is now finished, stop auto-refreshing.
if (data.playState === "finished") {
this.stopAutoRefresh();
}
if (this.currentStateHasChanged) {
this.state = data;
this.emit(this.AUTO_REFRESH_EVENT, this.state);