mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 08:38:11 +00:00
rename to startBlindSpotPhase
This commit is contained in:
parent
bc33117135
commit
631d15f3cb
@ -257,14 +257,14 @@ jsPsych.plugins["virtual-chinrest"] = (function () {
|
|||||||
// check what to do next
|
// check what to do next
|
||||||
if (trial.blindspot_reps > 0) {
|
if (trial.blindspot_reps > 0) {
|
||||||
get_item_width(); // modifies trial data
|
get_item_width(); // modifies trial data
|
||||||
configureBlindSpot();
|
startBlindSpotPhase();
|
||||||
} else {
|
} else {
|
||||||
distanceSetup.px2mm(get_item_width());
|
distanceSetup.px2mm(get_item_width());
|
||||||
endTrial();
|
endTrial();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function configureBlindSpot() {
|
function startBlindSpotPhase() {
|
||||||
document.querySelector("#content").innerHTML = blindspot_content;
|
document.querySelector("#content").innerHTML = blindspot_content;
|
||||||
drawBall();
|
drawBall();
|
||||||
jsPsych.pluginAPI.getKeyboardResponse({
|
jsPsych.pluginAPI.getKeyboardResponse({
|
||||||
@ -276,7 +276,6 @@ jsPsych.plugins["virtual-chinrest"] = (function () {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
var ball_position_listener = null;
|
|
||||||
function startBall(){
|
function startBall(){
|
||||||
ball_position_listener = jsPsych.pluginAPI.getKeyboardResponse({
|
ball_position_listener = jsPsych.pluginAPI.getKeyboardResponse({
|
||||||
callback_function: recordPosition,
|
callback_function: recordPosition,
|
||||||
@ -301,7 +300,7 @@ jsPsych.plugins["virtual-chinrest"] = (function () {
|
|||||||
display_element.querySelector("#content").innerHTML = report_content;
|
display_element.querySelector("#content").innerHTML = report_content;
|
||||||
display_element.querySelector('#distance-estimate').innerHTML = `${Math.round(trial_data["view_dist_mm"] / 10)} cm`
|
display_element.querySelector('#distance-estimate').innerHTML = `${Math.round(trial_data["view_dist_mm"] / 10)} cm`
|
||||||
|
|
||||||
display_element.querySelector("#redo_blindspot").addEventListener('click', configureBlindSpot)
|
display_element.querySelector("#redo_blindspot").addEventListener('click', startBlindSpotPhase)
|
||||||
display_element.querySelector("#proceed").addEventListener('click', endTrial);
|
display_element.querySelector("#proceed").addEventListener('click', endTrial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user