Skip to content

Commit

Permalink
layout bug fix is checkbox group is invisible, #342
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jan 9, 2025
1 parent cf6619f commit e02f7c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/netforce/view/NetForceControlPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ export default class NetForceControlPanel extends Node {
// Update the layout to support dynamic locale
Multilink.multilink( [ sumOfForcesStringProperty, valuesStringProperty, speedStringProperty ], () => {
verticalCheckboxGroupPanel.right = ForcesAndMotionBasicsLayoutBounds.width - 5;
this.resetAllButton.rightCenter = verticalCheckboxGroupPanel.rightBottom.plusXY( -BUTTON_PADDING, 35 );

// TODO: How should layout occur here when checkbox is hidden? https://github.com/phetsims/forces-and-motion-basics/issues/342
if ( verticalCheckboxGroupPanel.bounds.isFinite() ) {
this.resetAllButton.rightCenter = verticalCheckboxGroupPanel.rightBottom.plusXY( -BUTTON_PADDING, 35 );
}
} );
}
}
Expand Down

0 comments on commit e02f7c4

Please sign in to comment.