Closed samreid closed 1 year ago
Fixed, and I observed that they correctly collapse in studio.
I also added migration rules so 1.5 will still load. @arouinfar want to review this issue in studio?
@samreid the separators disappear as expected, so that's looking good. However, there are a few issues:
The separators extend beyond the bounds of the control panel
Setting sceneControl.visibleProperty
to false centers the remaining contents creating an odd indentation effect.
The separators extend beyond the bounds of the control panel
I fixed that in the commits.
Setting sceneControl.visibleProperty to false centers the remaining contents creating an odd indentation effect.
This is controlled by the AlignBox in the outer panel. When I change it like so:
The HSeparator doesn't fill the width.
@marlitas or @jonathanolson can you please comment how the GravityAndOrbitsControls
can fill to fit its container bounds, while keeping its contents left-aligned?
Did some initial research on this, and I would assume that passing a stretch: true
to GravityAndOrbitsControl would solve the problem. However, even with stretch: true
the VBox is calculating it's width to be about 65 px
less than the parent AlignBox's width.
This screenshot shows the behavior with scenery helper outlines. The red dash represents the AlignBox bounds.
I have a couple of hypotheses for what might be going on here:
line.size
appropriately and is not taking into consideration extra space it may have.This seems like buggy behavior to me, and something that @jonathanolson and I should look into on scenery's end.
AlignGroup doesn't currently set preferred sizes for anything, and this really isn't a good place to use AlignGroup. The AlignBox is just padding out the content. https://github.com/phetsims/scenery/issues/1493 exists to look into whether AlignGroup should be improved to do this type of thing.
Instead, just use the VBox itself and toss the AlignBoxes/AlignGroups for a simpler approach:
Thanks, looks great. @zepumph and I applied the patch and tested. Closing.
So they will autocollapse, see https://github.com/phetsims/scenery/issues/1480