Description of the problem:
I am using a slider in my experiment, and do not want any kind of marker. Instead of storing the slider response, I am recording the mouse position on click while the slider is visible. The mouse click ends the routine, rather than the slider response itself. In other words, the slider is only there as a cosmetic tool to help people gauge where to click to make their estimate.
The marker sometimes pops up and sometimes doesn’t, and it can be distracting. I have used a code component with the following in the Begin Routine tab:
slider.marker.opacity = 0
This works like a charm when I run the experiment via Builder, but when I run it online, I get an error message saying “TypeError: slider.marker is undefined”. (You will see this in the version linked above).
It seems the online JS version of the script no longer recognises the slider as “slider”. Is there another piece of code that will do this? Or another place to put this code?
I realise an easier option would be to create an image of the slider offline and simply display this, but I would like to know if it is possible to remove the slider marker for an online study.
I’m also experiencing a similar issue with my slider - it works perfectly fine in Builder, but not when uploaded to Pavlovia. When the study runs in Pavlovia, all the routines with sliders in are just skipped.
Just posting in case others are still interested in a possible solution, you can try (or whichever opacity you want)
slider._markerOpacity = 0.5
This line can just be included in the code component and it just auto JS just translate to the same syntax as slider._markerOpacity = 0.5. The caveat is that this opacity syntax setting doesn’t show up when you run locally with builder but when you sync it to Pavlovia the opacity does work and show up!