phetsims / molecule-shapes

"Molecule Shapes" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/molecule-shapes
GNU General Public License v3.0
5 stars 6 forks source link

Basics: `realMoleculeShapesProperty` includes values that are only valid in the full version #227

Closed arouinfar closed 1 year ago

arouinfar commented 1 year ago

Related to #223

The valid values of realMoleculeShapesProperty seems to be the full list of molecules available in Molecule Shapes. If you pass in a value that only appears in Molecule Shapes, Studio will not stop you.

For example, set the value to SF4 and it will appear to work, but the sim encounters a fatal error and freezes. image

@jonathanolson should the validation be limited to the 5 molecules in Molecule Shapes: Basics?

arouinfar commented 1 year ago

Tagging for https://github.com/phetsims/qa/issues/845.

zepumph commented 1 year ago

I was able to get this done by having the Property get validValues to start with. @arouinfar how does that look?

arouinfar commented 1 year ago

Thanks @zepumph! Everything looks good in master.