1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-11 16:18:10 +00:00

visual/Form: clean up slider options merging

This commit is contained in:
Sotiri Bakagiannis 2021-06-11 20:57:51 +01:00
parent f372162553
commit 77cdfa9646

View File

@ -851,7 +851,7 @@ export class Form extends util.mix(VisualStim).with(ColorMixin)
flip = true;
}
let style, labels, ticks, granularity;
let style, labels, ticks, granularity = 1;
if (item.type === Form.Types.CHOICE)
{
style = [Slider.Style.RATING, Slider.Style.RADIO];
@ -870,10 +870,11 @@ export class Form extends util.mix(VisualStim).with(ColorMixin)
style = [Slider.Style.RATING];
labels = item.tickLabels;
ticks = item.ticks;
granularity = 1;
}
responseStim = new Slider(
Object.assign(sliderOption, {
Object.assign({}, sliderOption, {
granularity,
size: sliderSize,
style,