-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using NumberControl instead of SliderWithReadout #42
Comments
I'll take care of this one. |
The short answer is no, it is not possible (currently) to do so. For your information, I wrote SliderWithReadout nearly two years ago. At that point we didn't have NumberControl. I attempted to write it in such a general way that it could become a common component. (which explains why there are so many options, many of which are not used in plinko-probability) |
There was already an issue: phetsims/scenery-phet#217 |
Great, thanks for looking into this @veillette. Comments in #42 (comment) make total sense. Feel free to leave this open or close depending on how you proceed in phetsims/scenery-phet#217. |
phetsims/scenery-phet#217 is closed, so this can now be addressed. |
@ariel-phet assigned this to me, to replace SliderWithReadout with NumberControl. Done, also fixed an i18n layout issue. I made the value font a tad larger, since it seemed awfully small compared to other displayed values. Screenshot below. @jessegreenberg would you mind reviewing? |
The code looks great @pixelzoom. I notice that the NumberControl thumbs are now green rather than the default HSlider light blue. The green is coming from the default for thumbFillEnabled in NumberControl. Can NumberControl use the default HSlider thumb color? |
Yes, I think that NumberControl should use the default HSlider thumb color. I've done that in the above commit. The only clients are currently hookes-law and CCK. I've verified that it doesn't change hookes-law. @samreid Please be aware that NumberControl is now using the default color for the HSlider thumb, rather than setting its own default of 'green'. If you were relying on 'green', you'll need to set |
I compared with an older dev version, and the thumb color is now correct. Closing. |
SliderWithReadout is quite similar to a new scenery-phet element called NumberControl. Could the common code element replace SliderWithReadout? If not, perhaps we could determine what options need to be added to NumberControl so that it could be used in plinko-probability.
The text was updated successfully, but these errors were encountered: