| Reference | Downloads | Github

How to change slider marker size & make it visible at start of trial

URL of experiment:

Hi I asked this follow-up question in another post, but since it is essentially a new topic, I thought I re-post thus:

For PsychoJS, the slider marker behaves differently than on local runs.
In my experiment I noticed the following:

a) in JS the marker only becomes visible once the mouse is released. Running locally, the marker becomes visible as soon as the scale is clicked.
Is there a way to change this?

b) How do I change the size of the marker? It is much bigger in JS than locally. I tried playing around with (slider.marker.size=(x,x) at BeginRoutine), but that does not seem to have any effect

Thanks, as always!

I believe the issue with the marker being the wrong size was recently fixed by @apitiot

From what I can tell of the slider code, it is aiming to update its marker position (and make visible) based on the the start of the drag rather than the end. Is there any difference int he devices you’re using? e.g. a mouse on desktop and a touchscreen for online? I just wonder if it’s the device rather than the code that behaves differently

Hi Jon,
the marker size issue still persist.
However, now the previous code I had

throws an error. when I remove it, the marker is super-sized.

I tested the experiment on a MacBook Pro with touchpad and on an iMac with Magic Mouse and in both instances the slide is not visible until AFTER the button is released


Please provide the actual error text.

Hi Michael – it is

  • TypeError: undefined is not an object (evaluating ‘slider.marker.size=(.1,.1)’)

The URL is