Closed pixelzoom closed 2 years ago
ComboBox is also not adjusting it's layout when labelNode
changes size. This bit of code probably needs to be replaced with an HBox:
if ( options.labelNode ) {
this.button.left = options.labelNode.right + options.labelXSpacing;
this.button.centerY = options.labelNode.centerY;
}
To see this in BLL, you can look at the label + ComboBox in either screen. Here's the Solute ComboBox in the Concentration screen (see SolutePanel.ts). Note (1) the extra space between the label and the ComboBox, (2) the incorrect ComboBox resize behavior, causing it's parent VBox to resize incorrectly, and (3) the partially drawn ComboBox.
Confirmed that it's an oversight of mine in ComboBox layout, it's not respecting preferred sizes correctly with a labelNode. I should have this fixed up today.
@marlitas and I fixed this in the above commit. @pixelzoom can you verify? Apologies about that.
No apologies necessary. Looks and behaves great in BLL. Thanks for the quick turnaround. Closing.
To demonstrate, make this change in BLL SolutePanel.ts:
The result looks like this:
I'm guessing that the optional
labelNode
was not considered when resize behavior was implemented for ComboBox, and it's assuming that the ComboBoxButton designes the size.This is impacting https://github.com/phetsims/beers-law-lab/issues/288, dynamic layout for BLL.