Skip to content

Commit 3d36215

Browse files
committed
Added repeat event.
1 parent 8fe2e30 commit 3d36215

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/animations/Animation.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,14 @@ var Animation = new Class({
803803

804804
component.pendingRepeat = false;
805805

806-
component.parent.emit('animationrepeat-' + component.currentAnim.key, this, component.currentFrame, component.repeatCounter, component.parent);
806+
var frame = component.currentFrame;
807+
var parent = component.parent;
807808

808-
component.parent.emit('animationrepeat', this, component.currentFrame, component.repeatCounter, component.parent);
809+
this.emit('repeat', this, frame);
810+
811+
parent.emit('animationrepeat-' + this.key, this, frame, component.repeatCounter, parent);
812+
813+
parent.emit('animationrepeat', this, frame, component.repeatCounter, parent);
809814
}
810815
}
811816
},

0 commit comments

Comments
 (0)