I have a question and I’m stuck since a few days, because none of the solutions I tried worked. I hope you can help
I have a rating scale that works great offline. As soon as it is uploaded online, the marker is not visible anymore until clicking on the scale with the mouse. Once clicked on it, everything works fine again.
Is there any way to make the marker visible before the mouse is clicked? This would be important because the mouse should not be used by the participants during the rest of the experiment.
I use PsychoPy v2021.2.3 and have taken a simple slider with style “rating” (Ticks from 1 to 9, granularity = 1, starting value = 2) and triangleMarker (default/circle does not work either).
To move the marker along the scale by the left and right arrow buttons I use the following short code (and it works offline and online after clicking with the mouse on the scale):
#Each Frame:
keys = event.getKeys()
if len(keys):
if ‘left’ in keys:
rating_1.markerPos = rating_1.markerPos - 1
elif ‘right’ in keys:
rating_1.markerPos = rating_1.markerPos + 1
Thanks for reporting this - that sounds as though “starting value” is not yet implemented in PsychoJS. After trying this locally I actually found I couldn’t set a value in “starting value” did you find this too?
Here are a couple of work around demos that I hope might help with your experiment for now!
thank you very much for your answer and the suggestions. Unfortunately I have not found a solution for the start position. I can’t even try the interactive slider online because I get an error message. I thought it was some little thing and I’m too inexperienced to find it, but it seems to be a basic problem.
Locally, setting the start value works for me. Though, in the JS I can’t find the value I set. However, setting rating_1.markerPos = 2 maually did not help. Until the mouse click, the marker remains invisible.
Do you know what exactly happens when I click the mouse? Could I simulate such a click?
Of course, but first it is important to mention that I download the slider, unzip it locally, open it with Psychopy and then upload it to pavlovia. The error message is:
TypeError: slider.setLabelHeight is not a function
Does this work in 2021.2.3? I’m having issues with my pie chart demo where I want the marker to appear at the start and then change colour and move when you click on a different colour in the chart.
Yes, this method should work for setting marker position at the start of the routine. For changing marker color I’de suggest having a look at this Hsv color slider - #2 by Becca
I came up with a different work around. I set the .markerPos setting on the first frameupdate in a code routine. Just set a boolean or a counter in the begin routine section and test it in the each frame section
eg