Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/jspsych-canvas-keyboard-response.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@
};

// to use the canvas stimulus function with timeline variables,
// the jsPsych.timelineVariable() function can be used inside your stimulus function
// the jsPsych.evaluateTimelineVariable() function can be used inside your stimulus function
var trial_procedure = {
timeline: [{
type: jsPsychCanvasKeyboardResponse,
stimulus: function(c) {
var ctx = c.getContext('2d');
ctx.beginPath();
ctx.fillStyle = jsPsych.timelineVariable('color');
ctx.fillStyle = jsPsych.evaluateTimelineVariable('color');
ctx.fillRect(
jsPsych.timelineVariable('upper_left_x'),
jsPsych.timelineVariable('upper_left_y'),
jsPsych.timelineVariable('width'),
jsPsych.timelineVariable('height')
jsPsych.evaluateTimelineVariable('upper_left_x'),
jsPsych.evaluateTimelineVariable('upper_left_y'),
jsPsych.evaluateTimelineVariable('width'),
jsPsych.evaluateTimelineVariable('height')
);
ctx.stroke();
},
Expand Down
2 changes: 1 addition & 1 deletion examples/timeline-variables.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
choices: ['y','n'],
stimulus: jsPsych.timelineVariable('v1'),
prompt: function() {
return '<p>Have you seen '+jsPsych.timelineVariable('v2', true)+ ' before? Press "y" or "n".</p>'
return '<p>Have you seen '+jsPsych.evaluateTimelineVariable('v2')+ ' before? Press "y" or "n".</p>'
},
stimulus_width: 300
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.