phetsims / forces-and-motion-basics

"Forces and Motion: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/forces-and-motion-basics
GNU General Public License v3.0
7 stars 10 forks source link

[State] Pusher position not being saved upon launch #241

Closed phet-steele closed 7 years ago

phet-steele commented 7 years ago
  1. Go to http://www.colorado.edu/physics/phet/dev/html/forces-and-motion-basics/2.3.0-phetiorc.3/wrappers/state/state.html?sim=forces-and-motion-basics&relativeSimPath
  2. Go to the Motion screen, pause the sim
  3. Apply some force to the left to put the pusher on the right side of the crate
  4. Bring the force back to 0 (so the pusher is simply standing on the right side of the crate)
  5. Press Launch at the bottom of the page. The pusher in this new sim will be at the default location on the left. @jessegreenberg and I have surmised that the pusher is simply set to the default location on every launch since its position property isn't being saved.

Seen on macOS 10.12.6 Chrome. For phetsims/QA#42.

jessegreenberg commented 7 years ago

In https://github.com/phetsims/forces-and-motion-basics/issues/240, @samreid suggested adding

 // Make sure the arms are updated (even if nothing else changed)
    phet.phetIo && phet.phetIo.phetio.setStateEmitter && phet.phetIo.phetio.setStateEmitter.addListener( updateImage );

So that the image is updated with state. I am wondering if a similar solution is needed to fix this one.

ariel-phet commented 7 years ago

Personally, I think the important detail is that the pusher is just standing, which side the pusher is standing on is an unimportant detail since the pusher will switch sides when a given applied force is applied. I think you could ignore this issue.

jessegreenberg commented 7 years ago

Sounds good, marking as wontfix.

jessegreenberg commented 7 years ago

Like https://github.com/phetsims/forces-and-motion-basics/issues/238, this issue can be closed.