mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 08:38:11 +00:00
add on_timeline_finish when repetition happens
This commit is contained in:
parent
983810145b
commit
87b210112d
@ -552,6 +552,10 @@ window.jsPsych = (function() {
|
|||||||
// if we're all done with the timeline_variables, then check to see if there are more repetitions
|
// if we're all done with the timeline_variables, then check to see if there are more repetitions
|
||||||
else if (progress.current_repetition < timeline_parameters.repetitions - 1) {
|
else if (progress.current_repetition < timeline_parameters.repetitions - 1) {
|
||||||
this.nextRepetiton();
|
this.nextRepetiton();
|
||||||
|
// check to see if there is an on_timeline_finish function
|
||||||
|
if (typeof timeline_parameters.on_timeline_finish !== 'undefined'){
|
||||||
|
timeline_parameters.on_timeline_finish();
|
||||||
|
}
|
||||||
return this.advance();
|
return this.advance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user