(1) This was harder than it should have been, because Slider addTick sets tick labels to pickable: false. So after calling addTick, I had to work around that by explicitly setting pickable: true for each of my tick labels. I doubt that we're gaining much by making tick labels pickable: false, so I suggest removing that.
I would be in favor of adding this feature to Slider. I think it would be helpful in other sims too.
Assigning to @jbphet since he's the responsible dev for this repo. There are a bunch of other Slider-related GitHub issues, and perhaps this should be part of some "epic" that does some much-needed work on Slider.
Over in https://github.com/phetsims/fourier-making-waves/issues/114#issuecomment-897007348, I added interactive tick labels. Clicking on a tick label sets the Slider's Property to the value associated with that tick. You can find my implementation in FMWNumberControl.js.
A couple of things...
(1) This was harder than it should have been, because Slider
addTick
sets tick labels topickable: false
. So after callingaddTick
, I had to work around that by explicitly settingpickable: true
for each of my tick labels. I doubt that we're gaining much by making tick labelspickable: false
, so I suggest removing that.(2) @arouinfar found this feature to be very useful, and suggested adding it as an option to Slider. In https://github.com/phetsims/fourier-making-waves/issues/114#issuecomment-897007348:
Assigning to @jbphet since he's the responsible dev for this repo. There are a bunch of other Slider-related GitHub issues, and perhaps this should be part of some "epic" that does some much-needed work on Slider.