phetsims / build-an-atom

"Build an Atom" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/build-an-atom
GNU General Public License v3.0
11 stars 10 forks source link

atom position off in game #149

Closed jbphet closed 7 years ago

jbphet commented 7 years ago

I'm regression testing master after pulling in some things from the 1.4-phetio branch, and saw a problem in the game where the position of an atom was off, see screenshot below. This should be fixed before next release off of master that includes the game.

baa-atom-position-off

jbphet commented 7 years ago

Here's another somewhat similar case that I ran into:

baa-atom-position-off-2

phet-steele commented 7 years ago

@jessegreenberg @jbphet this did not get fixed before the release of 1.6.0-rc.1. JB decided Jesse should fix it. For phetsims/QA/issues/22.

jessegreenberg commented 7 years ago

Thanks @phet-steele, shutting down the RC until this is added.

jessegreenberg commented 7 years ago

Layout fixed in the above commit, layout was changed so that it looks like the published version.

phet-steele commented 7 years ago

@jessegreenberg, the atoms in every game look to be correctly vertically aligned on the screen, but not horizontally. Between different challenges, you can see an atom jump left and right with respect to each other. Below, the atom for Helium is much more to the left:

screen shot 2017-07-19 at 11 31 04 am screen shot 2017-07-19 at 11 31 29 am
jessegreenberg commented 7 years ago

@phet-steele do you know if the deployed version exhibits any of this atom jumping?

phet-steele commented 7 years ago

@phet-steele do you know if the deployed version exhibits any of this atom jumping?

It does.

jbphet commented 7 years ago

IMO, this is still worth fixing even if it appears in the published version unless it is unexpectedly difficult to do so.

jessegreenberg commented 7 years ago

@jbphet sounds good.

The atom is placed relative to its center, and the stability indicator for a particular AtomNode will change its bounds: screen shot 2017-07-20 at 5 36 34 pm

If we place the atom according to its left bound, things should align.

jessegreenberg commented 7 years ago

Handled in the above commit. Seemed to fix it, and I verified that the other AtomNodes in the other game views don't have this problem.

phet-steele commented 7 years ago

I LIKE it!