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

URL of experiment: https://run.pavlovia.org/MJB/immanent-justice-v1-3/html/

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

Thanks
Marc

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 https://run.pavlovia.org/MJB/immanent-justice-v1-3/html/

Thanks
Marc

@Michael Did you have any more ideas about what is going on with slider marker size?>
I removed the code so I can test other aspects of the experiment…

@Marc_Buehner, good news is that this is fixed in the imminent 3.2.0 release.

1 Like

I have the same issue, my current version is 3.1.0 and I am afraid that updating to 3.2.0 will break other parts of my task. Is there a way around this without updating?

Hi @YT_HAN, the fix is available in 3.2.0, but required changes to the PsychoJS library. If you have not began collecting data, you could instead try setting the version of your experiment using PsychoPys versioning system. This will allow you to use later versions of PsychoPy without actually upgrading the software. Go to Experiment Settings > Use version and set to 3.2.4 or later. Then, resync your study to Pavlovia and try again.

Thank you for the reply, I tried what you said and the good news is that it no longer throw me an error. However, I don’t think the marker size is changed. I did it by entering slider.markerSize= 0.04, did I do anything wrong?
By the way, setting the version to 3.2.4 (3.2.3 works) thru Builder doesn’t allow me to sync, I have to go to the js file and change the version there.

If you want to change the Slider marker size, it scales with the height of the Slider component, so you could make the height of the Slider smaller/larger to get a smaller/larger marker size. Does that help fix the issue?

1 Like

I see, that works. I just thought the marker size could be changed independently of the slider height. Thanks for all your help!

1 Like