Skip to content
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

Molecules created with atoms spread out #118

Closed
KatieWoe opened this issue Nov 22, 2019 · 8 comments
Closed

Molecules created with atoms spread out #118

KatieWoe opened this issue Nov 22, 2019 · 8 comments

Comments

@KatieWoe
Copy link
Contributor

Test device
Dell
Operating System
Win 10
Browser
Chrome
Problem description
For phetsims/qa#459
When two atoms are combined to make a molecule, they can form up at odd angles and far from each other in certain conditions.
Steps to reproduce

  1. Pick out an atom and drag it outside the play area and let it return there
  2. Do the same with a second (may help to make them land on top of each other, but doesn't seem necessary)
  3. Either click the atoms if they are on top of each other or drag them together if not

Visuals
separateatoms

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: 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: 1536x722
Pixel Ratio: 2.5/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: 4096
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32)
Max viewport: 32767x32767
OES_texture_float: true
Dependencies JSON: {}

@arouinfar
Copy link
Contributor

I found a similar issue. However, I think the most important detail is that the first atom is dragged out of bounds.

@Denz1994
Copy link
Contributor

Related to #120

@JRomero0613
Copy link

This happens when the atoms are placed close to the bucket area and the collection area. The atoms are placed on top of each other and a connection between the two is not made.

@Denz1994
Copy link
Contributor

An atom shouldn't be bonding when the atom is separating. We can use a flag to determine when an atom can be bonded and when it can't. This should be fixed in this dev version. Can you confirm @KatieWoe?

@Denz1994
Copy link
Contributor

This is still buggy and shouldn't be reviewed yet. The flag for separation isn't resetting properly. Self-assigning.

@Denz1994 Denz1994 assigned Denz1994 and unassigned KatieWoe Jan 22, 2020
Denz1994 added a commit that referenced this issue Jan 23, 2020
@Denz1994
Copy link
Contributor

Patch applied to Kit.canBond(). The kit now checks if the atom is contained within the play area bounds. The previous implementation was a remnant of when we were checking for an isAnimationProperty.

This dev version should have the appropriate fixes @KatieWoe.

@KatieWoe
Copy link
Contributor Author

Looks good in that dev version after a quick check

@Denz1994
Copy link
Contributor

Nice, thanks for the check. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants