mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-12 08:38:10 +00:00
visual/Form: clean up slider options merging
This commit is contained in:
parent
f372162553
commit
77cdfa9646
@ -851,7 +851,7 @@ export class Form extends util.mix(VisualStim).with(ColorMixin)
|
|||||||
flip = true;
|
flip = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let style, labels, ticks, granularity;
|
let style, labels, ticks, granularity = 1;
|
||||||
if (item.type === Form.Types.CHOICE)
|
if (item.type === Form.Types.CHOICE)
|
||||||
{
|
{
|
||||||
style = [Slider.Style.RATING, Slider.Style.RADIO];
|
style = [Slider.Style.RATING, Slider.Style.RADIO];
|
||||||
@ -870,10 +870,11 @@ export class Form extends util.mix(VisualStim).with(ColorMixin)
|
|||||||
style = [Slider.Style.RATING];
|
style = [Slider.Style.RATING];
|
||||||
labels = item.tickLabels;
|
labels = item.tickLabels;
|
||||||
ticks = item.ticks;
|
ticks = item.ticks;
|
||||||
|
granularity = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
responseStim = new Slider(
|
responseStim = new Slider(
|
||||||
Object.assign(sliderOption, {
|
Object.assign({}, sliderOption, {
|
||||||
granularity,
|
granularity,
|
||||||
size: sliderSize,
|
size: sliderSize,
|
||||||
style,
|
style,
|
||||||
|
Loading…
Reference in New Issue
Block a user