Slider does not work with pixels as unit of measurement

OSX 10.15.7
2021.1.4
*Standard Standalone

Slider with pixel spatial units: The center categories would always be selected regardless of where I clicked. If there are an odd number of categories, the center one would be selected always. If there was an even number categories, one of the two center most categories was selected.

It worked if I use height units. I didn’t try other units of measurement (norm, deg, etc). I spent 2 weeks trying to figure this out. If it doesn’t work with a particular measurement, that measurement shouldn’t be one of the choices. Ideally it should work with all units of measure.

There’s no error message. With pixels as unit of measurement, it just does not work correctly.

1 Like

Ah, I see the problem… :slider: Sliders get their position via a :mouse: Mouse component contained within them, but Mouse components don’t have their own units - they just use the same as the window. So when you click it’s giving the slider a position in the window’s units and then applying it in the slider’s units - so e.g. if the window is in height units, the position will be <1 and in pix this is basically nothing.

For this upcoming release I’ll just disable units for the :slider: Slider component, by the next release we’re hoping to integrate an object to handle positions & sizes between different units similar to how we do colours in different spaces, which will fix this as the Mouse will return one of these objects instead. Thanks for spotting this!

Could you add this as an Issue on GitHub?

This just means it’s easier to keep track of - feel free to assign it to me, will keep it on my priorities list :slight_smile: