VESPR Demo Interactive Slider

Hi There,

Hope this might help! https://run.pavlovia.org/lpxrh6/color_slider_demo

Note that for other reasons, I wrote in JS for this project, but the code is so small/simple you will easily be able to implement that locally!

I also hit a few snags when I was working on this project. As you pointed out, the attributes of the marker in slider are not simple to interact with online (color being one of them), I’ve added some methods to help interacting with them add getMarkerPos for sliders by RebeccaHirst · Pull Request #324 · psychopy/psychojs · GitHub and flagged some of the reasons it’s hard to manipulate color BUG: slider.setFillColor is not a function · Issue #322 · psychopy/psychojs · GitHub to the team - they are on it :muscle:

Because of the current bug with color I actually use a polygon overlaying the marker (the color of that is easy to change), and set the marker alpha to 0.

Hope this helps!
Becca

1 Like