Skip to content

Commit

Permalink
Wrap text in a container Node to fix dynamic layout, see #725
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid authored and pixelzoom committed Jul 13, 2021
1 parent d95fa57 commit b6ca8fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/HomeScreenButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class HomeScreenButton extends VBox {
textPropertyOptions: { phetioReadOnly: true } // text is updated via screen.nameProperty
} );

super( merge( { children: [ nodeContainer, text ] }, options ) );
super( merge( { children: [ nodeContainer, new Node( { children: [ text ] } ) ] }, options ) );

// @public (read-only)
this.screen = screen;
Expand Down
2 changes: 1 addition & 1 deletion js/NavigationBarScreenButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class NavigationBarScreenButton extends Node {

// spacing set by Property link below
const iconAndText = new VBox( {
children: [ iconAndFrame, text ],
children: [ iconAndFrame, new Node( { children: [ text ] } ) ],
pickable: false,
usesOpacity: true, // hint, since we change its opacity
maxHeight: navBarHeight
Expand Down

0 comments on commit b6ca8fa

Please sign in to comment.