close #153 emit event when it being casted
This commit is contained in:
@@ -131,7 +131,13 @@ export class Replayer {
|
||||
if (isSync) {
|
||||
castFn();
|
||||
} else {
|
||||
actions.push({ doAction: castFn, delay: this.getDelay(event) });
|
||||
actions.push({
|
||||
doAction: () => {
|
||||
castFn();
|
||||
this.emitter.emit(ReplayerEvents.EventCast, event);
|
||||
},
|
||||
delay: this.getDelay(event),
|
||||
});
|
||||
}
|
||||
}
|
||||
this.timer.addActions(actions);
|
||||
|
||||
@@ -313,4 +313,5 @@ export enum ReplayerEvents {
|
||||
SkipStart = 'skip-start',
|
||||
SkipEnd = 'skip-end',
|
||||
MouseInteraction = 'mouse-interaction',
|
||||
EventCast = 'event-cast',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user