Skip to content

Commit

Permalink
Add maxWidth for remainder answer, see: #258
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Jun 4, 2024
1 parent 249f685 commit 05bc1ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/common/view/MeanCalculationPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ type SelfOptions = {
export type MeanCalculationPanelOptions = SelfOptions & WithRequired<PanelOptions, 'tandem'>;

// constants
const TEXT_MAX_WIDTH = 300;
const LABEL_FONT = new PhetFont( 16 );
const LABEL_TEXT_OPTIONS = { font: LABEL_FONT, maxWidth: 300 };
const LABEL_TEXT_OPTIONS = { font: LABEL_FONT, maxWidth: TEXT_MAX_WIDTH };
const FRACTION_NUMBER_FONT = new PhetFont( 14 );
const NUMBER_FONT = new PhetFont( 16 );
const VINCULUM_LINE_WIDTH = 1;
Expand Down Expand Up @@ -261,7 +262,8 @@ export default class MeanCalculationPanel extends Panel {
remainder: meanRemainder
} );
valueRepresentation = new Text( patternStringProperty, {
font: NUMBER_FONT
font: NUMBER_FONT,
maxWidth: TEXT_MAX_WIDTH
} );
}

Expand Down

0 comments on commit 05bc1ff

Please sign in to comment.