-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State oddly saved if ball bumped off screen #163
Comments
@arouinfar I confirmed that the ball is being "bumped" to the left of ball1. But I don't believe that this is actually a bug due to how restart/states work; at the END of when any ball is manipulated, every balls state is saved, if and only if it is in-bounds. This decision was described in #90 (comment), where @arouinfar said:
So essentially what is happening in this scenario is:
However, if you think the current behavior is incorrect, we could slightly alter this behavior; the states are always grouped as one, so when the user is finished manipulating AND none of the balls are out-of-bounds, ALL of the states of every ball is saved. If any of the balls are out-of-bounds, NONE of the states are saved. If that makes sense. |
I would prefer this all-or-nothing approach to saving the state @brandonLi8. |
OK. Done in the commit above. Back to @arouinfar. |
Looks good in master @brandonLi8. |
For phetsims/qa#537 and related to #100.
It's generally rare to completely lose a ball when it is bumped away from its neighbors. However, after an inelastic collision, balls are grouped by a wall. Clicking on a middle ball can cause it to be bumped out of bounds. When trying to recover it with the restart button, the lost ball will return to its previously saved state, but the other balls will remain where they were with the lost ball was clicked.
@brandonLi8 this behavior seems odd to me. Can all balls return to their previously saved states? If not, I'm ok with the partially saved state since it allows the user to easily retrieve the lost ball.
Steps to reproduce:
6. Release Ball 2, and it will disappear. (Likely bumped to the left of Ball 1.)
The text was updated successfully, but these errors were encountered: