mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
change start param to slider_start
This commit is contained in:
parent
d236f028f0
commit
121428cf31
@ -19,7 +19,7 @@ labels | array of strings | Labels displayed at equidistant locations on the sli
|
||||
button_label | string | 'Continue' | Label of the button to end the trial.
|
||||
min | integer | 0 | Sets the minimum value of the slider
|
||||
max | integer | 100 | Sets the maximum value of the slider
|
||||
start | integer | 50 | Sets the starting value of the slider
|
||||
slider_start | integer | 50 | Sets the starting value of the slider
|
||||
step | integer | 1 | Sets the step of the slider. This is the smallest amount by which the slider can change.
|
||||
slider_width | integer | null | Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display.
|
||||
require_movement | boolean | false | If true, the subject must move the slider before clicking the continue button.
|
||||
@ -36,6 +36,7 @@ Name | Type | Value
|
||||
response | numeric | The numeric value of the slider.
|
||||
rt | numeric | The time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response.
|
||||
stimulus | string | The path of the audio file that was played.
|
||||
slider_start | numeric | The starting value of the slider.
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -13,7 +13,7 @@ labels | array of strings | [] | Labels displayed at equidistant locations on th
|
||||
button_label | string | 'Continue' | Label of the button to end the trial.
|
||||
min | integer | 0 | Sets the minimum value of the slider.
|
||||
max | integer | 100 | Sets the maximum value of the slider.
|
||||
start | integer | 50 | Sets the starting value of the slider
|
||||
slider_start | integer | 50 | Sets the starting value of the slider
|
||||
step | integer | 1 | Sets the step of the slider. This is the smallest amount by which the slider can change.
|
||||
slider_width | integer | null | Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display.
|
||||
require_movement | boolean | false | If true, the subject must move the slider before clicking the continue button.
|
||||
@ -31,6 +31,7 @@ Name | Type | Value
|
||||
response | numeric | The numeric value of the slider.
|
||||
rt | numeric | The time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response.
|
||||
stimulus | string | The HTML content that was displayed on the screen.
|
||||
slider_start | numeric | The starting value of the slider.
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -16,7 +16,7 @@ labels | array of strings | [] | Labels displayed at equidistant locations on th
|
||||
button_label | string | 'Continue' | Label of the button to advance/submit
|
||||
min | integer | 0 | Sets the minimum value of the slider
|
||||
max | integer | 100 | Sets the maximum value of the slider
|
||||
start | integer | 50 | Sets the starting value of the slider
|
||||
slider_start | integer | 50 | Sets the starting value of the slider
|
||||
step | integer | 1 | Sets the step of the slider
|
||||
slider_width | integer | null | Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display.
|
||||
require_movement | boolean | false | If true, the subject must move the slider before clicking the continue button.
|
||||
@ -34,6 +34,7 @@ Name | Type | Value
|
||||
response | numeric | The numeric value of the slider.
|
||||
rt | numeric | The time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response.
|
||||
stimulus | string | The path of the image that was displayed.
|
||||
slider_start | numeric | The starting value of the slider.
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -38,6 +38,8 @@ Name | Type | Value
|
||||
response | numeric | The numeric value of the slider.
|
||||
rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response.
|
||||
stimulus | string | JSON encoding of the `sources` array.
|
||||
slider_start | numeric | The starting value of the slider.
|
||||
start | numeric | The start time of the video clip.
|
||||
|
||||
## Example
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
type: 'html-slider-response',
|
||||
stimulus: '<div style="margin: 50px auto; width: 100px; height: 100px; background-color: rgb(29, 23, 138)"></div>',
|
||||
labels: ['Purple', 'Blue'],
|
||||
start: 10,
|
||||
slider_start: 10,
|
||||
slider_width: 500,
|
||||
prompt: '<p>Is this color closer to purple or blue? Use the slider above. (5s time limit; custom starting value).</p>',
|
||||
trial_duration: 5000
|
||||
|
@ -26,7 +26,7 @@
|
||||
type: 'image-slider-response',
|
||||
stimulus: 'img/happy_face_2.jpg',
|
||||
labels: ['1 (least happy)', '100 (most happy)'],
|
||||
start: 80,
|
||||
slider_start: 80,
|
||||
slider_width: 500,
|
||||
prompt: '<p>How happy is this person on a scale of 1-100? (5s time limit; set start value)</p>',
|
||||
trial_duration: 5000
|
||||
|
@ -25,7 +25,7 @@ jsPsych.plugins['audio-slider-response'] = (function() {
|
||||
default: 100,
|
||||
description: 'Sets the maximum value of the slider',
|
||||
},
|
||||
start: {
|
||||
slider_start: {
|
||||
type: jsPsych.plugins.parameterType.INT,
|
||||
pretty_name: 'Slider starting value',
|
||||
default: 50,
|
||||
@ -114,7 +114,7 @@ jsPsych.plugins['audio-slider-response'] = (function() {
|
||||
html += 'width:'+trial.slider_width+'px;';
|
||||
}
|
||||
html += '">';
|
||||
html += '<input type="range" value="'+trial.start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" style="width: 100%;" id="jspsych-audio-slider-response-response"></input>';
|
||||
html += '<input type="range" value="'+trial.slider_start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" style="width: 100%;" id="jspsych-audio-slider-response-response"></input>';
|
||||
html += '<div>'
|
||||
for(var j=0; j < trial.labels.length; j++){
|
||||
var width = 100/(trial.labels.length-1);
|
||||
@ -182,7 +182,7 @@ jsPsych.plugins['audio-slider-response'] = (function() {
|
||||
var trialdata = {
|
||||
"rt": response.rt,
|
||||
"stimulus": trial.stimulus,
|
||||
"start": trial.start,
|
||||
"slider_start": trial.slider_start,
|
||||
"response": response.response
|
||||
};
|
||||
|
||||
|
@ -35,7 +35,7 @@ jsPsych.plugins['html-slider-response'] = (function() {
|
||||
default: 100,
|
||||
description: 'Sets the maximum value of the slider',
|
||||
},
|
||||
start: {
|
||||
slider_start: {
|
||||
type: jsPsych.plugins.parameterType.INT,
|
||||
pretty_name: 'Slider starting value',
|
||||
default: 50,
|
||||
@ -109,7 +109,7 @@ jsPsych.plugins['html-slider-response'] = (function() {
|
||||
html += 'width:'+trial.slider_width+'px;';
|
||||
}
|
||||
html += '">';
|
||||
html += '<input type="range" value="'+trial.start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" style="width: 100%;" id="jspsych-html-slider-response-response"></input>';
|
||||
html += '<input type="range" value="'+trial.slider_start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" style="width: 100%;" id="jspsych-html-slider-response-response"></input>';
|
||||
html += '<div>'
|
||||
for(var j=0; j < trial.labels.length; j++){
|
||||
var width = 100/(trial.labels.length-1);
|
||||
@ -164,7 +164,7 @@ jsPsych.plugins['html-slider-response'] = (function() {
|
||||
var trialdata = {
|
||||
"rt": response.rt,
|
||||
"stimulus": trial.stimulus,
|
||||
"start": trial.start,
|
||||
"slider_start": trial.slider_start,
|
||||
"response": response.response
|
||||
};
|
||||
|
||||
|
@ -55,7 +55,7 @@ jsPsych.plugins['image-slider-response'] = (function() {
|
||||
default: 100,
|
||||
description: 'Sets the maximum value of the slider',
|
||||
},
|
||||
start: {
|
||||
slider_start: {
|
||||
type: jsPsych.plugins.parameterType.INT,
|
||||
pretty_name: 'Slider starting value',
|
||||
default: 50,
|
||||
@ -144,7 +144,7 @@ jsPsych.plugins['image-slider-response'] = (function() {
|
||||
html += 'width:'+trial.slider_width+'px;';
|
||||
}
|
||||
html += '">';
|
||||
html += '<input type="range" value="'+trial.start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" style="width: 100%;" id="jspsych-image-slider-response-response"></input>';
|
||||
html += '<input type="range" value="'+trial.slider_start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" style="width: 100%;" id="jspsych-image-slider-response-response"></input>';
|
||||
html += '<div>'
|
||||
for(var j=0; j < trial.labels.length; j++){
|
||||
var width = 100/(trial.labels.length-1);
|
||||
@ -199,7 +199,7 @@ jsPsych.plugins['image-slider-response'] = (function() {
|
||||
var trialdata = {
|
||||
"rt": response.rt,
|
||||
"stimulus": trial.stimulus,
|
||||
"start": trial.start,
|
||||
"slider_start": trial.slider_start,
|
||||
"response": response.response
|
||||
};
|
||||
|
||||
|
@ -272,6 +272,7 @@ jsPsych.plugins["video-slider-response"] = (function() {
|
||||
"rt": response.rt,
|
||||
"stimulus": trial.stimulus,
|
||||
"start": trial.start,
|
||||
"slider_start": trial.slider_start,
|
||||
"response": response.response
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user