phetsims / projectile-motion

"Projectile Motion" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
15 stars 13 forks source link

Customization of tool visibility can be messy #257

Closed arouinfar closed 3 years ago

arouinfar commented 3 years ago

For #244

Setting view.dataProbeNode.visibleProperty or view.measuringTapeNode.visibleProperty to true will make the tool appear in the play area. The icon will still appear in the toolbox unless view.toolboxPanel.dataProbeIconNode.visibleProperty or view.toolboxPanel.measuringTapeIconNode.visibleProperty is set to false. On the surface, this seems fine, but things get weird if you try to return either tool to the toolbox.

For example

  1. On any screen, set view.dataProbeNode.visibleProperty to true and the corresponding view.toolboxPanel.dataProbeIconNode.visibleProperty to false.
  2. Try to return the DataProbeNode to the toolbox, but it won't go in.

This feels pretty weird, so let's discuss at design meeting.

arouinfar commented 3 years ago

I'm no longer bothered by this issue. Clients using Studio to customize the sim should simply drag the tool out of the toolbox before launching. The tools are stateful and can be returned to the toolbox without any issue. If a client wants to instead use the API, they should communicate with the tool's isActivtyProperty, such as model.dataProbe.isActiveProperty.