-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
odd pink arc in control panel #199
Comments
@pixelzoom the issue is that the Air Resistance checkbox should be left-aligned (as it is on other screens). The pink arc is the corresponding icon for air resistance. This is documented in the last checkbox in #177 (comment). |
Thanks for reporting and finding the offending commit. |
Still a problem in master after pull-all.sh, projectile-motion df1a1fd. |
It seems odd that this would cause the problem. If the icon is for the Air Resistance checkbox, it should be part of that checkbox's label (text + icon), and would move with the checkbox. So I think you should take a look at how this icon was added -- sounds like it was added incorrectly. |
@pixelzoom currently the text and icons are separate nodes, but that is being addressed in #190
|
The icon is indeed being added incorrectly. Here's the code in LabProjectilePanel: // air resistance
const airResistanceLabel = new Text( airResistanceString, LABEL_OPTIONS );
const airResistanceCheckbox = new Checkbox( airResistanceLabel, model.airResistanceOnProperty, {
maxWidth: options.minWidth - AIR_RESISTANCE_ICON.width - 3 * options.xMargin,
boxWidth: 18,
tandem: tandem.createTandem( 'airResistanceCheckbox' )
} );
const airResistanceCheckboxAndIcon = new HBox( {
spacing: options.xMargin,
children: [ airResistanceCheckbox, AIR_RESISTANCE_ICON ]
} ); It should be: // air resistance
const airResistanceCheckboxContent = new HBox( {
spacing: options.xMargin,
children: [ new Text( airResistanceString, LABEL_OPTIONS ), AIR_RESISTANCE_ICON ]
} );
const airResistanceCheckbox = new Checkbox( airResistanceCheckboxContent, model.airResistanceOnProperty, {
maxWidth: options.minWidth - AIR_RESISTANCE_ICON.width - 3 * options.xMargin,
boxWidth: 18,
tandem: tandem.createTandem( 'airResistanceCheckbox' )
} ); |
I did a few fixes here. I'll explain them individually:
All of these changes were closely aligned because this layout issue occurred in during active development. It may happen again before work is done in this sim, and I will be on the lookout. See #177 for central issue of work for the repo. |
While responding to #197, I noticed an odd pink arc in over the word "Resistance", in this control panel in the Lab screen. This was in projectile-motion sha a2510ac.
The text was updated successfully, but these errors were encountered: