phetsims / build-a-molecule

"Build a Molecule" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
8 stars 7 forks source link

Atoms being returned from off of the play area do not repel existing molecules on the play area #120

Closed loganbraywork closed 4 years ago

loganbraywork commented 4 years ago

Test device Windows 10 Laptop Operating System Windows 10 Browser Chrome Problem description For https://github.com/phetsims/QA/issues/459

Atoms which cannot bond with an existing molecule will normally repel the molecule if placed near it. This behavior does not occur when an atom is being returned from off of the play area to the play area, leading to overlap. Steps to reproduce

  1. Enter the Multiple screen
  2. Create water
  3. Move water molecule to the edge of the play area
  4. Drag an oxygen atom off of the play area relatively close to the water molecule Visuals 2019-11-22NoBnceBldMlcle

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Build a Molecule‬ URL: https://phet-dev.colorado.edu/html/build-a-molecule/0.0.0-dev.23/phet/build-a-molecule_all_phet.html Version: 0.0.0-dev.23 2019-11-20 23:29:39 UTC Features missing: generatedcontent, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36 Language: en-US Window: 1536x754 Pixel Ratio: 1.25/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 4095 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}

Denz1994 commented 4 years ago

The CollectionLayout includes the appropriate bounds for the play area. After the collection layout is responsible for the bounds the molecules can be contained inside of when separating (see Kit.separateMoleculeDestinations()). The correction here is that the play area bounds and separation bounds are now using the collection layout's bounds.

Can you confirm this isn't an issue in this dev version @KatieWoe?

loganbraywork commented 4 years ago

Appears to be fixed

Denz1994 commented 4 years ago

Nice. Closing.