psychopy.org | Reference | Downloads | Github

Slider - Marker not visible online

URL of experiment: https://run.pavlovia.org/MJB/immanentjustice/html/

Description of the problem:

The marker is not visible in the online version of the experiment.
I checked earlier posts and fiddled with colour, but to no avail.
However, the trial does wait until a response is made (i.e. click on the scale), so it is not the problem of the trial ending before the marker is drawn (as per pervious posts)

Any pointers?
Thanks!
N

Hi @Marc_Buehner, this is a problem that occurs when the Slider ends the routine when a rating is made. Here, the trial ends before the marker is drawn. To get around this, you could set the 'Slider to not end the routine, and use another method to continue, e.g., pressing space after a response is made.

HI David,
Thanks for that! Yes, that works!
TWO follow on questions:

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 the solution you posted to an earlier question (slider.marker.size=(.1,.1) at BeginRoutine), but that throws an error in JS

Thanks, as always!

Hi @dvbridges is there another way to show the marker, while keeping the “force end of routine” option on? Timing is essential in my study so I’d like to avoid another step. Thanks.

Hi Marc,
I’m having a similar issue with the slider online. The solution to add a keypress after the rating is not ideal for me, but it works. I had a look at your experiment, and was wondering what parameters you used so that participants could not simply press “space” without giving a rating? How do you force them to use the slider, if it’s not the action that forces the end of the routine? Thanks!

HI @lcrible,

Here is what I did in PsychoPy

for thisRater in catchList:
    if thisRater.getRating() in [1,2]:
        responseChecker+=1
        catchList.remove(thisRater)
if responseChecker >= 6 and mouse.isPressedIn(button):
    continueRoutine = False

and in PsychoJS:


for (let thisRater of catchList){
    if ([1,2].includes(thisRater.getRating())){
        responseChecker = responseChecker +1;
        var index_L = catchList.indexOf(thisRater);
        if (index_L > -1) {
            catchList.splice(index_L, 1);
            }
        }
    }



if (responseChecker >= 6 && button.contains(mouse) && mouse.getPressed()[0] === 1)
    continueRoutine = false;

responseChecker is set to 0 at the start of the routine, and increments by 1 each time a valid rating (here coded as 1 or 2) is made on one of the ‘sliders’ (radio buttons) – which are contained in catchList

Hope that makes sense

Marc

Hi Marc,

Thanks for your reply. So if I don’t need to check for the answer (any answer is fine), could I just use

if mouse.isPressedIn(button):

    continueRoutine = False

?

Or is the bit before necessary?

Also I get a “mouse not defined” error so I assume you had to define that before, could I ask how? Thanks again.

Ludivine

image001.jpg

HI @lcrible,

I think there are a couple of things here.
I have a mouse event in the builder called ‘mouse’ and it has ‘button’ as a clickable stimulus.
If you leave the code before out, then a subject could just press the button and proceed – you would not be able to force them to make the selections from the radio buttons. In my case any response is fine as well, but I need this code to make sure that there is SOME response.
Hope this makes sense
Marc

I looked at your experiment file and simply realized that you set the keyboard component to start on the condition “slider.rating”, which works like a charm. Thanks a lot!

With my apologies for the delay in getting back to you, I have fixed the slider issue.
The fix is available in PsychoJS version 3.2, 3.2.0, 2020.1, and 2020.2.

Alain

Hi,
I am using 2020.1.3 but I have the same issue with slider. The marker does not appear online or it sometimes appears if I starts it at the center. Btw it works perfectly offline. Should I correct something in the code or in 2020.1.3 slider works online as the builder creates?

Here is my code if you want to check something: https://gitlab.pavlovia.org/merve73/soa_temporal/blob/master/html/Soa_original.js

I think the problem with the marker remains. It’s not visible online but it works perfectly locally. I am also using 2020.1.3.

Same here. I use 2020.1.3 and the slider does not show online (even if I move it to appear right in the middle of the screen). Any suggestion? Thanks.

Hello @Elena1,

Could you tell me which operating system and browser you are using? e.g. Firefox on Windows.
And could you perhaps take a screen copy?

Hi and thanks for the message. I use IceDragon, which is basically Firefox, on Windows 10 home. I could send you a pic of the screen, but you wouldn’t see anything (since the rating scale is not shown)…maybe you mean the code?
thanks again!

If you could take a screenshot, so I can see what is happening, that would help.
And also the name of your experiment, indeed.

Do you also experience the same issue when you open the experiment on actual Firefox, if you have it installed?

Hi Alain, thanks.
So, here’s the link (it’s on piloting mode, shall I put it on running for you to see?, sorry, am new to the platform): https://pavlovia.org/elena/ic_fast
and no, it runs very good on my pc (see attached)
online, I also have troubles with the characters, which suddenly appear super large (but I am fixing that manually)


if you wish a pic of the online study, I tried to make one but didn’t succeed, sorry

There is no rating_3 component in your online experiment that corresponds to the PsychoPy rating_3. Indeed there is no slider at all.
So the issue is not one of sliders. Perhaps there was an issue with the generation of the code? I would encourage you to check out the error messages.

Alain

This is very strange, because it runs on my pc (and on other people’s pc too), and I do not get any error. The code is as follows:
rating_3 = visual.RatingScale(win=win, name=‘rating_3’, marker=‘triangle’, size=1.0, pos=[0.0, -0.2], low=1, high=10, labels=[’’], scale=’’)
so I’m not sure what happens when it goes online
thanks anyway!
(this is how I see it when I run on my laptop)
Presentazione standard1|690x388