phetsims / bending-light

"Bending Light" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/bending-light
GNU General Public License v3.0
8 stars 8 forks source link

stringTest=long disconnects wire from intensity meter body #331

Closed ariel-phet closed 8 years ago

ariel-phet commented 8 years ago

stringTest=long shows some odd behavior for the intensity meter (the wire disconnects from the meter body).

May not need to fix, but it does appear to happen with anything that goes above the stringTest=double.

capture

@samreid should investigate to see if this is an easy fix

samreid commented 8 years ago

It looks like part of the intensity meter layout is using the width of the intensity meter body, and the width is being augmented by the numeric readout. Since the strings should appear like so:

image

or image

This will not be a problem unless translators substitute a much longer symbol for % or -. I tried adding the Belarusian translation for "percent" and it looked like this:

image

Since we do permit translation of this symbol, perhaps I should add a max width to this text.

samreid commented 8 years ago

Putting maxWidth to be 85% of the width of the white panel, it looks like this:

image

With the English case still looking good:

image

This is a non-invasive change and will not require significant re-testing (just a spot test on 1 platform), so I'll go ahead and commit it to master and the 1.0 branch.

samreid commented 8 years ago

I've made this commit in the 1.0 branch and merged to master. I'll mark this for "Needs Spot Test" in the next RC.

EDIT: I'll use the pre-existing "ready-for-review" label.

arouinfar commented 8 years ago

Looks good! Closing.