From ed9a228e4f9b8860f44dcf3c9c4c88e4603422f9 Mon Sep 17 00:00:00 2001 From: Luisav1 Date: Fri, 11 Aug 2023 10:03:46 -0600 Subject: [PATCH] Change maxWidth for fullChartImage in FullChartDialog.ts to work with shorter strings. See https://github.com/phetsims/build-a-nucleus/issues/112. --- js/chart-intro/view/FullChartDialog.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/chart-intro/view/FullChartDialog.ts b/js/chart-intro/view/FullChartDialog.ts index 46c207b..05ab0e1 100644 --- a/js/chart-intro/view/FullChartDialog.ts +++ b/js/chart-intro/view/FullChartDialog.ts @@ -37,7 +37,7 @@ class FullChartDialog extends Dialog { const fullChartInfoText = new RichText( stringProperty, combineOptions( { 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