Skip to content

Commit

Permalink
add maxWidth for full chart dialog, #90
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jul 31, 2023
1 parent 3b6dc87 commit 83a0c86
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions js/chart-intro/view/FullChartDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@

import Dialog, { DialogOptions } from '../../../../sun/js/Dialog.js';
import buildANucleus from '../../buildANucleus.js';
import { allowLinksProperty, Color, Image, Node, Rectangle, RichText, RichTextOptions, VBox, Text } from '../../../../scenery/js/imports.js';
import { allowLinksProperty, Color, Image, Node, Rectangle, RichText, RichTextOptions, Text, VBox } from '../../../../scenery/js/imports.js';
import fullNuclideChart_png from '../../../images/fullNuclideChart_png.js';
import { combineOptions } from '../../../../phet-core/js/optionize.js';
import BANConstants from '../../common/BANConstants.js';
import DerivedStringProperty from '../../../../axon/js/DerivedStringProperty.js';
import BuildANucleusStrings from '../../BuildANucleusStrings.js';
import StringUtils from '../../../../phetcommon/js/util/StringUtils.js';

assert && assert( typeof BANConstants.INFO_DIALOG_TEXT_OPTIONS.maxWidth === 'number', 'maxWidth needed for text' );

class FullChartDialog extends Dialog {

public constructor() {
Expand Down Expand Up @@ -47,7 +49,10 @@ class FullChartDialog extends Dialog {
spacing: 10
} ),
combineOptions<DialogOptions>( {
title: new Text( BuildANucleusStrings.fullNuclideChartStringProperty, { font: BANConstants.TITLE_FONT } )
title: new Text( BuildANucleusStrings.fullNuclideChartStringProperty, {
font: BANConstants.TITLE_FONT,
maxWidth: BANConstants.INFO_DIALOG_TEXT_OPTIONS.maxWidth
} )
}, combineOptions<DialogOptions>( {
maxWidthMargin: 800,
bottomMargin: 60
Expand Down

0 comments on commit 83a0c86

Please sign in to comment.