phetsims / reactants-products-and-leftovers

"Reactants, Products and Leftovers" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 4 forks source link

horizontal alignment of sandwich icons is off #36

Closed pixelzoom closed 9 years ago

pixelzoom commented 9 years ago

See screenshot below, problematic icons indicated by arrows. These icons are slight left of where they should be; they should be centered above the numbers. This broke sometime after version 1.0.0.

screenshot_540

pixelzoom commented 9 years ago

1.0.0 was published Jan 15 08:22.

pixelzoom commented 9 years ago

Oops. The above commits should have been associated with #35.

pixelzoom commented 9 years ago

Bisected this. It broke when the switch from sun.HStrut to scenery.HStrut occurred. So there's something different about scenery.HStrut.

Verified by changing this line 49 of SandwichNode from this:

thisNode.addChild( new HStrut( MAX_WIDTH, { centerX: 0 } ) );

to this:

thisNode.addChild( new Line( 0, 0, MAX_WIDTH, 0, { centerX: 0 } ) );

pixelzoom commented 9 years ago

This was a bug in scenery.Spacer, the supertype of HStrut. Fixed in https://github.com/phetsims/scenery/issues/442. Closing.