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

Bond Angle location not maintained for linear molecules in Studio/State #205

Closed Nancy-Salpepi closed 2 years ago

Nancy-Salpepi commented 2 years ago

Test device MacBook Air (m1 chip)

Operating System 12.0.1

Browser Chrome and Safari

Problem description For https://github.com/phetsims/qa/issues/745 and https://github.com/phetsims/qa/issues/746

For linear molecules in both screens, the location of the bond angle and label can be different when viewing in Studio vs launched sim, or Upstream sim vs Downstream sim in State Wrapper.

Steps to reproduce Example for Molecule Shapes in Studio:

  1. Go to the Real Molecules Screen and select XeF2
  2. You can keep the 'Show Loan Pairs' checkbox checked or you can uncheck it
  3. Check 'Show Bond Angles'
  4. Rotate molecule so that the bond angle flips to the bottom
  5. Launch sim --the angles are in different places

Example in State:

  1. Go to the Model Screen
  2. Check 'Show Bond Angles' --the angles are in different places

Visuals

Screen Shot 2021-11-30 at 12 05 17 PM

locationofbondangle

Nancy-Salpepi commented 2 years ago

This seems similar to https://github.com/phetsims/molecule-shapes/issues/22

I do see it in the sim as well. For example, when switching between 'real' and 'model' for CO bondangleflips 2

arouinfar commented 2 years ago

Nice find @Nancy-Salpepi, especially with digging up #22.

@jonathanolson I'm a bit concerned that the bond angle shifts when the sim is launched. I don't think the shifting label itself is a particularly serious issue, but I wonder if it is indicative of deeper issues with state saving.

jonathanolson commented 2 years ago

Added some data used to determine the bond angle placement into state saving. @Nancy-Salpepi can you verify that this is fixed? I tested both state and studio.

Nancy-Salpepi commented 2 years ago

The bond angle location is maintained once the sim is launched in studio/state. @jonathanolson I do still see what I reported in https://github.com/phetsims/molecule-shapes/issues/205#issuecomment-982964751

jonathanolson commented 2 years ago

Finally believe I got this one fixed. Can you verify?

Nancy-Salpepi commented 2 years ago

All looks good now on Master!

jonathanolson commented 2 years ago

Thanks!