Closed KatieWoe closed 5 years ago
It looks like the maxWidth for the units takes into account the width of the value. Since "500" is wider than "4.7", the ohms units are shorter. Related commit references https://github.com/phetsims/ohms-law/issues/50.
maxWidth: OhmsLawConstants.SLIDER_WIDTH - valueText.width - READOUT_SPACING,
The rtl issue is because the spacing of the letters symbol and label have a negative value that was chosen because it looks good with english strings.
@ariel-phet @arouinfar do you think this issue is worth looking into? We can fix the vertical spacing issue by laying out text like https://github.com/phetsims/resistance-in-a-wire/issues/106. @zepumph can you comment on whether it is important that the maxWidth of the units be dependent on the width of the value?
Eh, just doing it 🐩, The above commit handles the rtl portion of the issue.
I tested with stringTest=long, stringTest=double, stringTest=x, stringTest=rtl to make sure that #134 was still fixed after the change. Should be ready for verification in the next RC once commits are merged into 1.4 branch.
Pushed to 1.4.
Looks good in 1.4.0-rc.3
Test device: Dell Operating System: Win 10 Browser: chrome Problem description: For https://github.com/phetsims/QA/issues/313 I noticed that some string tests cause the voltage/resistance strings and the variables above them can overlap. The Ohm string max width is also shorter than the corresponding V. This is likely very minor. Steps to reproduce:
Screenshots:
Troubleshooting information (do not edit):