phetsims / circuit-construction-kit-common

"Circuit Construction Kit: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
10 stars 10 forks source link

Using phet-io to hide a circuit tool icon, then dropping a circuit element of that type, makes the tool icon reappear. #802

Closed samreid closed 2 years ago

samreid commented 2 years ago

Discovered in https://github.com/phetsims/circuit-construction-kit-common/issues/589#issuecomment-694843412

In this version, dragging out other components or resetting doesn't restore the resistor tool. But dragging the resistor tool to to the toolbox restores it. I'll wait for guidance on how to proceed here, but here are some options:

samreid commented 2 years ago

@arouinfar and I discussed this today. We considered a new attribute on the circuit element model, canBeDroppedInToolbox which defaults to true, but can be set to false if the client wants to prevent that.

samreid commented 2 years ago

UPDATE: We have a new plan in https://github.com/phetsims/circuit-construction-kit-common/issues/797 that will affect this issue.

samreid commented 2 years ago

We added CircuitElement.isDisposableProperty in #797, can this issue be closed?

samreid commented 2 years ago

@arouinfar and I discussed, and agreed this is solved by isDisposableProperty, closing.