phetsims / masses-and-springs-basics

"Masses and Springs: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 3 forks source link

Teleporting ruler safari #43

Closed KatieWoe closed 5 years ago

KatieWoe commented 5 years ago

Device iPad Air 2 OS iOS 12 Browser Safari Problem Description For https://github.com/phetsims/QA/issues/220 When leaving Safari on the iPad, it is possible for the ruler on the Stretch screen to return to its start position without input. Steps to reproduce

  1. On an iPad with Safari, go to the Stretch screen
  2. Move the ruler to a noticeably different location
  3. Press the Home button on the iPad to go the iPads menu. Do Not quit Safari
  4. Click the Safari button to return to the sim
  5. Observe the ruler

Screenshot https://drive.google.com/file/d/1D5bTAmpyX4inHCvv6Cz9Y2L41YvEs6kD/view?usp=sharing

arouinfar commented 5 years ago

@KatieWoe mentioned that the ruler only teleports on the first screen, which does not have a toolbox. In the video it looks like the ruler is returning to its "home" position.

Denz1994 commented 5 years ago

This looks like a side effect of the current behavior of floating draggable objects. Currently, the ruler node gets set back to its home position as described by @arouinfar above. Fix pending.

Denz1994 commented 5 years ago

The ruler node no longer resets its position when intersecting the layout bounds. I will post a new dev version for verification, but it can be reviewed in master.

Denz1994 commented 5 years ago

Starting the sim in a very wide screen causes the ruler to start in the middle of the screen, which seems less than ideal. Fix pending.

image

Denz1994 commented 5 years ago

I pushed a fix to master that causes the ruler to initialized beneath the options panel. The current behavior should be reviewed in master @arouinfar.

arouinfar commented 5 years ago

@Denz1994 opening master with a wide aspect ratio, still looks like the screenshot in https://github.com/phetsims/masses-and-springs-basics/issues/43#issuecomment-440031328. However, I think this is preferable, because the ruler is in closer proximity to the thing it's meant to measure (spring).

As for the teleporting, I'll leave it up to @KatieWoe to check on an iPad.

KatieWoe commented 5 years ago

I think that the behavior on iPad looks good.

Denz1994 commented 5 years ago

I agree with this reasoning @arouinfar. I couldn't think of another example of a permanently draggable object on the screen that doesn't float but must maintain on screen. Since this isn't a problem any longer and the above behavior is in master, I'm closing this issue. Thanks, @arouinfar and @KatieWoe.