OS : Win10 PsychoPy version (e.g. 1.84.x): 2020.2.10
Hi all,
Does anyone know if and where I can find code for a (radio) slider in both python and JS? I want to add my slider in a code component, as my slider (made with the slider component) currently looks fine on my desktop but inconsistent and weird online. I thought it might help if I can instead put the slider in a code component and perhaps adjust it there.
Ideally weâd like to get it so that the Slider looks the same online as offline, so if you could share some details about what specifically is wrong with it then that would be a huge help. Could you take screenshots of it on each platform?
Getting the code is easier said than done - you could get the code to initialise the Slider easily enough, but Slider also inserts some code each frame and each routine so youâd need that too, and to make sure itâs put in the right place via the Code component. This is doable, but is difficult and probably more trouble than itâs worth. Youâre probably better off putting some JavaScript in the Each Routine tab to change the properties of the Slider, rather than making it again from scratch. If you share screenshots of each I can try putting something together to line them up for you (and put the same code into the program so this problem doesnât happen in future!)
I also notice youâre using the last version, we made quite a few changes to Slider in 2021.1.0 so it may be worth updating to see if itâs any better for you, back up your experiment first though as the changes may affect backwards compatibility!
I did use the most current version first, but the slider there gave me quite some troubles (online). This is why I went back to the 2020.2.10 version.
After starting this topic I found some posts on issues with label alignment, and I think it is now ââfixedââ by using Wakefields crib sheet (i.e. making a code_JS section with this at âbegin experimentâ:
The red dot is one a few people have found - itâs something weâre working on (if not already fixed for the next bug fix release). Essentially, itâs a mismatch between what the Slider interprets âcolorâ as - the dot is actually there, itâs just that itâs the same color as the space behind it. If you change the Sliderâs âcolorâ to something other than white it should become visible.
The bigger dots are new, so Iâll bring this up with the JS team. Synchronising Sliders between Python and JS is something weâre working on at the moment, so this is really helpful, thanks!
My issues in the 2021.1.2 version were/are quite similar:
The red part in the (radio) slider seems to have completely disappeared. So when (in the running experiment) I am clicking a âradio buttonâ / circle on the slider, I see no red at all.
The size of the dots in the slide (Radio) also do not appear to update when Iâm syncing changes on to Pavlovia
Unfortunately, the solution of changing the sliderâs color to something other than white (in the builder-slider component) does not appear to work. Is there something else I can do? (2020.2.10)