phetsims / acid-base-solutions

"Acid-Base Solutions" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/sims/html/acid-base-solutions/latest/acid-base-solutions_en.html
GNU General Public License v3.0
4 stars 7 forks source link

Make it possible to hide all of the tools #206

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

You currently can't hide all of the tools -- 1 tool is always shown (pH meter, pH paper, conductivity tester).

The easist way to do this would be to add a 4th value for viewProperties.toolModeProperty, like this:

screenshot_2697

Selecting 'none' would cause all 3 radio buttons to become disabled, and no tool to be shown. The designer should also hide the radio buttons in this case, but that would be their responsibility.

Another way to solve this would be to add a wrapper node around the tools, who visibleProperty the designer could turn off. The problem with this approach is that the radio buttons would still appear to work, but would do nothing. And the designer would still be responsible for hiding the radio buttons.

I prefer the approach of adding a 'none' value. @arouinfar what say ye?

pixelzoom commented 1 year ago

Since adding 'none' as a choice for viewProperties.toolModeProperty was so trivial, I went ahead and did it in the above commit. Test drive it, let me know what you think.

arouinfar commented 1 year ago

I prefer the approach of adding a 'none' value. @arouinfar what say ye?

I agree @pixelzoom, and I think it's an elegant solution. I stumbled across it in the tree before seeing this issue, and it was really easy to understand.

I think it's worth documenting in the examples, so I've tagged it in #191.