phetsims / geometric-optics

Geometric Optics is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 5 forks source link

Object position changes if sim is launched while zoomed out #469

Closed KatieWoe closed 1 year ago

KatieWoe commented 1 year ago

Device Samsung OS Win 11 Browser Chrome Problem Description For https://github.com/phetsims/qa/issues/938 and https://github.com/phetsims/qa/issues/939. If you are zoomed out on a scene and the object is further from the lens/mirror than it would be when fully zoomed in then the object will be moved to that closer distance when launched, even if there is room further from the lens/mirror. Steps

  1. Zoom the scene out
  2. Move the object further from the lens/mirror. Not necessarily to the edge
  3. Launch the sim

Visuals start end

pixelzoom commented 1 year ago

Reproduced in master. This is a problem with framed objects and lights, but not with arrows.

The cause of this may be the same as the problem with tools in #467.

pixelzoom commented 1 year ago

Addressed in the commit above. @KatieWoe please verify in master, close if OK. Be sure to test all object types: at least 1 framed object (e.g. "Pencil"), Arrow, and Light.

KatieWoe commented 1 year ago

This looks good with all three object types on master :)

pixelzoom commented 1 year ago

Thanks @KatieWoe!