phetsims / area-builder

"Area Builder" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/area-builder
GNU General Public License v3.0
1 stars 2 forks source link

Text box issues with stringTest=double #87

Closed brroberts1231 closed 8 years ago

brroberts1231 commented 8 years ago

This issue is different from #85 Test device: Dirac

Operating System: OS X 10.11.2

Browser: Chrome

Problem description: When using stringTest=double, some words in the game section overlap or go outside the colored box they should be in.

Screenshots: screen shot 2016-01-20 at 11 24 45 am

Troubleshooting information (do not edit): Name: ‪Area Builder‬:‪Area Builder‬ URL: http://phettest.colorado.edu/area-builder/area-builder_en.html?ea&brand=phet&dev&stringTest=double Version: 1.1.0-dev.1 (require.js) Features missing: touch User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 Language: en-US Window: 1115x582 Pixel Ratio: 1/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: 15 uniform: 1024 Texture: size: 8192 imageUnits: 16 (vertex: 16, combined: 16) Max viewport: 8192x8192 OES_texture_float: true Dependencies JSON: {}

For task phetsims/tasks#479

phet-steele commented 8 years ago

@jbphet the strings in the "headers" of each game challenge do not stay centered as the string gets longer. The strings in question are the general "Build It!", "A Solution:", etc... strings, not the challenge specific strings like "Area = 19, Perimeter = 3000". The misalignment is noticeable with ?stringTest=double, but I put in a long string to accentuate the issue:

longoff

phet-steele commented 8 years ago

As a small note, the Values panel on the Explore screen does something similar. BUT it is only noticeable with very long strings. ?stringTest=double looks fine.

longoff2

jbphet commented 8 years ago

I've added a fix for the problem noted in https://github.com/phetsims/area-builder/issues/87#issuecomment-217937697.

As for the "small note" mentioned in https://github.com/phetsims/area-builder/issues/87#issuecomment-217941018, the behavior only manifests with extremely long strings, and even the stringTest=long test looks reasonable (the query parameter used was apparently stringsTest=xss), so it is extremely unlikely that this will be a problem in the real world and I don't plan to spend any time on it.

phet-steele commented 8 years ago

Fixed.