phetsims / mean-share-and-balance

"Mean: Share and Balance" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 1 forks source link

Location of movable fulcrum should be maintained when switching scenes #178

Closed amanda-phet closed 3 months ago

amanda-phet commented 4 months ago

When I go from the movable fulcrum scene (prediction scene?) to the actual mean scene, then go back, the fulcrum always goes back to 5. I think it should stay where I left it.

marlitas commented 3 months ago

Hmmm. This is going to be interesting because the fulcrum is a slider that relies on one Property.

It actually stays at whatever the Mean value is because it can only rely on one Property. If there are no balls kicked then yes that would be 5. Maybe we actually want two elements here then... One is the slider that we can move, and then we have a triangle appear as just the Mean fulcrum which would be a completely different Node rather than the same Node with a different fill...

What are your thoughts @jbphet? I think the other option would be to create a lastMovableFulcrumValueProperty that we would grab from whenever we switch back to the MovableFulcrum scene, but that seems like an unnecessary model complication.

marlitas commented 3 months ago

Committed above. Over to @amanda-phet for design review, and @jbphet for code review.

jbphet commented 3 months ago

Code looks good. I added a few comments. Unassigning.

amanda-phet commented 3 months ago

This is working great! Thanks! We didn't discuss it today but this came up in interviews and this is going to be a great change.