Closed megan-phet closed 6 years ago
It is possible to lose just one track following the above steps. @megan-phet thought it would be a good idea to show how to lose all of the tracks.
This issue can be resolved by pressing the reset all button.
This does look related to #271, but easier to reproduce. I do see this in the published version. bumpAboveGround
docs are tagged with #71, heading over there for more info.
Comments over there say
To keep good performance, we could match the Java behavior: constrain the control points to y>0 and bump up splines after release of control point or track.
While looking into this I noticed that tracks can also be lost when resizing the window: https://i.gyazo.com/1a322e46acf3e976b5da1cdb46d3591d.gif
One way to fix this is to restrict control points to the available bounds when bumping the track above ground and when the model bounds change. This changes behavior slightly because the track shape can change during some window size changes. @arouinfar @ariel-phet or @samreid can you think of a reason this would not be desirable?
For instance, here is the new behavior: https://i.gyazo.com/828e4e0a215fa35200438908e81dc925.gif
Published version behaves like this: https://i.gyazo.com/20911c3e2bac2b98f4aed98ae67e6f1f.gif
Notice how control points are free to move off screen in the published version. But there are cases where they can get lost as pointed out in the original issue ticket.
I agree the main disadvantage of the proposed approach is changing the shape of the track, but it is impossible to keep the track shape intact and fully in bounds for the cases you described. So maybe that's OK? I'd love to hear from @arouinfar and @ariel-phet.
@samreid I'm on board with @jessegreenberg's proposed solution. I think it's important to keep the track nodes within the visible bounds, so shifting the track shape when resizing the window is an acceptable trade-off.
I doubt that many users will be habitually resizing their browser windows. However, for those who do resize the window, I think the behavior in @jessegreenberg's gif looks pretty natural so it's unlikely to be perceived as a bug.
Agreed @jessegreenberg proposed solution seems like a good trade-off
Great, thanks all. Ready for review.
@jessegreenberg it's fixed on master.
Thanks @megan-phet! Since we are currently in dev testing, we can be sure that the fix will make it into the next RC. Closing this issue.
Test device:
MacBook Pro
Operating System:
macOS 10.13.5
Browser:
All, latest.
Problem description:
For phetsims/QA/issues/134. Moving the tracks to the ground will bump them up off the screen.
This problem is similar to #271, which was found by @jonathanolson.
Steps to reproduce:
Screenshots:
https://drive.google.com/file/d/1UyvXM0SwB20Nnr4YSo-wjTXSAoc31OGB/view?usp=sharing
Troubleshooting information (do not edit):