phetsims/build-an-atom

Particles automatically make pyramid to the right of the bucket

Closed this issue · 3 comments

Test device
Dell
Operating System
Win 10
Browser
Firefox
Problem description
For phetsims/qa#482
The subatomic particles in the buckets seem to default to a pyramid position to the right of the bucket. If you move particles not in that position they automatically move there, and you can't move them back. In the published sim the particles position in the bucket doesn't matter as long as something is under them. (This is a bit hard to describe. Let me know if you need more info.)

Visuals
defaultpyramid

Troubleshooting information:

!!!!! DO NOT EDIT !!!!!
Name: ‪Build an Atom‬
URL: https://phet-dev.colorado.edu/modules-testing/build-an-atom/phet/build-an-atom_all_phet.html
Version: 1.7.0-dev.0 2020-02-20 20:09:34 UTC
Features missing: touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0
Language: en-US
Window: 1536x750
Pixel Ratio: 2.5/1
WebGL: WebGL 1.0
GLSL: WebGL GLSL ES 1.0
Vendor: Mozilla (Mozilla)
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: {}

Happening in other sims with buckets of particles, such as Isotopes and Atomic Mass

@Denz1994 - this behavior was introduced in phetsims/phetcommon@c60cdfc. I looked through and figured out was was going on, but I think it'd be best if you fixed it. Let me know if you'd like a hand with it.

During refactoring, I removed an argument out of getNearestOpenPosition(position). This means the desitnationProperty was not being used when iterating over the openPositions closest to the destinationProperty. A different Vector2 was being used.

The correct destinationProperty.value was reintroduced and this was fixed in BAA and IAM. Closing this one.