Skip to content

Commit

Permalink
improve docs, see #256
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Jan 13, 2023
1 parent fbff459 commit af11181
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/common/view/ThermometerAndReadout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ class ThermometerAndReadout extends Node {
} );
this.addChild( comboBox );

// Make sure the NumberDisplays are all the same width, https://github.com/phetsims/greenhouse-effect/issues/256
// Make sure the NumberDisplays are all the same width. This has to be done after the ComboBox is constructed
// because the ComboBox creates these nodes using a passed-in creator function. See
// https://github.com/phetsims/greenhouse-effect/issues/256.
const maxItemWidth = Math.max( ..._.map( comboBox.nodes, 'width' ) );
comboBox.nodes.forEach( ( node: Node ) => {
if ( node instanceof NumberDisplay ) {
Expand Down

0 comments on commit af11181

Please sign in to comment.