Skip to content

Commit

Permalink
Change maxWidth for fullChartImage in FullChartDialog.ts to work with…
Browse files Browse the repository at this point in the history
… shorter strings. See #112.
  • Loading branch information
Luisav1 committed Aug 11, 2023
1 parent afce37a commit ed9a228
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/chart-intro/view/FullChartDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class FullChartDialog extends Dialog {
const fullChartInfoText = new RichText( stringProperty, combineOptions<RichTextOptions>( {
links: { url: linkText } // RichText must fill in URL for link
}, BANConstants.INFO_DIALOG_TEXT_OPTIONS ) );
fullChartImage.setMaxWidth( fullChartInfoText.width - 100 ); // determined empirically so image is a bit smaller than text length
fullChartImage.setMaxWidth( 481.5 ); // determined empirically so image is a bit smaller than text length
const fullChartImageBorderRectangle = Rectangle.bounds( fullChartImage.bounds.dilated( 5 ), { stroke: Color.BLACK } );

// create and add the full chart info dialog and button
Expand Down

0 comments on commit ed9a228

Please sign in to comment.