phetsims / build-an-atom

"Build an Atom" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/build-an-atom
GNU General Public License v3.0
11 stars 10 forks source link

Multiple instances of the "Electron Cloud" view property #144

Closed phet-steele closed 7 years ago

phet-steele commented 7 years ago

Why are there two of these? (four if you count the symbol screen)

screen shot 2017-03-03 at 10 42 26 am

They both do the same thing: set the visibility of the electron cloud. We could probably get by with only one? The top instance is toggled in conjunction with changing between the "Orbits" and "Cloud" radio button, but the bottom can only be changed manually. What I mean by that:

Watch the visibility of the orange highlighted text. It toggles when I switch between radio button selections in the sim. The yellow highlighted text's visibility does not change: baaio01

Seen on macOS 10.12.3 Chrome. For phetsims/tasks/issues/792.

jbphet commented 7 years ago

The problem existed because the ElectronCloudView type was a scenery node that contained a circle node that was also called electronCloudNode in the tandem namespace. I could have simply renamed the circle node, but decided instead to simplify the code a bit and make ElectronCloudView descend directly from Circle. I've tested it myself and it seems to work fine, and it resolves the problem pointed out by this GitHub issue. I'll unassign for now and will list this with the issues to be verified during the next RC.

phet-steele commented 7 years ago

This works much better @jbphet, thanks!