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

maxPairsProperty is easily exceeded when first interacting with the bond panels #176

Closed phet-steele closed 2 years ago

phet-steele commented 3 years ago

According to phetsims/special-ops/issues/190

His desired customizations: Model Screen: This one is tricky. We would prefer to limit the number of electron pairs (whether binding or lone) to 4. That is, not to allow learners to create molecules like XY5, XY6, etc.

I can do this in phetsims/QA/issues/635 by changing moleculeShapes.global.model.maxPairsProperty to 4. However...

  1. Enter Studio
  2. Change moleculeShapes.global.model.maxPairsProperty to TWO, not 4.
  3. Press "Preview Sim"
  4. Go into the Model screen of the newly launched sim, and notice you can still add another bond, even though you are already at the limit of two.

This is just one example, but essentially it appears the sim will always let you add one bond before checking if you are at, or above the maxPairsProperty. Once a bond has been added or removed, the sim correctly restrains the user from exceeding the max in the future.

Seen on Win 10 Chrome.

jonathanolson commented 3 years ago

I believe I've solved this (tested in the state wrapper through the console... studio seemed to not be transferring things at all right now).

Can you verify when studio is working?

arouinfar commented 2 years ago

@jonathanolson I reviewed this as a part of #188, and I am no longer able to reproduce in master, closing.