mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
Merge 50de647a5e
into 861cd1e646
This commit is contained in:
commit
99360ad6b3
@ -73,6 +73,11 @@ const info = <const>{
|
||||
type: ParameterType.BOOL,
|
||||
default: true,
|
||||
},
|
||||
/** If true, the slider's value will be displayed in real time below the slider. */
|
||||
value_display: {
|
||||
type: ParameterType.BOOL,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data: {
|
||||
/** The time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. */
|
||||
@ -131,7 +136,13 @@ class HtmlSliderResponsePlugin implements JsPsychPlugin<Info> {
|
||||
trial.max +
|
||||
'" step="' +
|
||||
trial.step +
|
||||
'" id="jspsych-html-slider-response-response"></input>';
|
||||
'" id="jspsych-html-slider-response-response"> ';
|
||||
if (trial.value_display) {
|
||||
html += 'oninput="this.nextElementSibling.value = this.value"></input>';
|
||||
html += "<output>" + trial.slider_start + "</output>";
|
||||
} else {
|
||||
html += "></input>";
|
||||
}
|
||||
html += "<div>";
|
||||
for (var j = 0; j < trial.labels.length; j++) {
|
||||
var label_width_perc = 100 / (trial.labels.length - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user