Closed Luisav1 closed 2 years ago
@Luisav1 - Your changes seem reasonable, so I think you should remove the TODO and close this issue. I opened an issue for follow up on this - see #35 - because I think this code probably shouldn't be here at all. I'll work with other devs on that part.
@Luisav1 - I ended up removing the code in question, please see https://github.com/phetsims/shred/issues/35. The only thing that I'd like to request is that you thoroughly regression test and make sure that the nucleus is correctly reconfiguring in Build a Nucleus in all situations. If that all looks good, you can close this.
Thanks @jbphet! The nucleus ended up not reconfiguring when any nucleons were removed or after any decays occurred in BAN but those were fixed in the commits above. Since the nucleus is correctly reconfiguring in all BAN situations I will close this.
In Build a Nucleus, a beta decay changes a proton to a neutron or a neutron to a proton, so overall the mass number stays the same. We don't want the nucleus to reconfigure when the mass number does not change so the multilink below was changed to link only to the
massNumberProperty
. Visually this does not change the other simulations relying on this since themassNumberProperty
is the sum of theprotonCountProperty
andneutronCountProperty
. We wanted to confirm that this is okay across all usages of ParticleAtom and AtomNode.Original:
New link:
You can check this all out in context at line 155 in ElectronShellView.js. @jbphet could you please take a look at this and see if it seems reasonable to change? Let me and @chrisklus know if you want to take a look at it together. Thanks!