Closed pixelzoom closed 1 year ago
The My Solutions screen has this control panel:
When the switch is set to "strong", we want to hide the slider, but keep the empty space for it in the control panel:
But we also want to allow the PhET-iO client to permanently hide the slider. And when they do so, the space in the control panel should disappear:
Accomplishing this was tricky. It needs to be reviewed, and probably described in the Client Guide.
Here's the relevant part of acidBaseSolutions.mySolutionScreen.view.solutionPanel.strengthControl in the tree:
acidBaseSolutions.mySolutionScreen.view.solutionPanel.strengthControl
strengthControl.sliderWrapper.slider.visibleProperty is phetioReadOnly: true. It's controlled by the sim, and is a DerivedProperty.
strengthControl.sliderWrapper.slider.visibleProperty
phetioReadOnly: true
If the client wants to hide the slider, they need to use strengthControl.sliderWrapper.visibleProperty.
strengthControl.sliderWrapper.visibleProperty
@Nancy-Salpepi and I reviewed this, and it looks good. I added a note in #191 to document how to hide the slider. Thanks @pixelzoom!
The My Solutions screen has this control panel:
When the switch is set to "strong", we want to hide the slider, but keep the empty space for it in the control panel:
But we also want to allow the PhET-iO client to permanently hide the slider. And when they do so, the space in the control panel should disappear:
Accomplishing this was tricky. It needs to be reviewed, and probably described in the Client Guide.
Here's the relevant part of
acidBaseSolutions.mySolutionScreen.view.solutionPanel.strengthControl
in the tree:strengthControl.sliderWrapper.slider.visibleProperty
isphetioReadOnly: true
. It's controlled by the sim, and is a DerivedProperty.If the client wants to hide the slider, they need to use
strengthControl.sliderWrapper.visibleProperty
.