Skip to content

Commit

Permalink
Explicitly show titleNode area with stroke, see: #45
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed May 2, 2023
1 parent 289de36 commit 2452bd6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/common/view/CAVAccordionBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export default class CAVAccordionBox extends AccordionBox {
expandCollapseButtonOptions: {
sideLength: BUTTON_SIDE_LENGTH
},
// TODO: This is currently highlighting a layout issues with AccordionBox, see: https://github.com/phetsims/center-and-variability/issues/166
titleBarOptions: {
stroke: 'black'
},
titleNode: titleNode
}, providedOptions );

Expand All @@ -60,10 +64,6 @@ export default class CAVAccordionBox extends AccordionBox {
rectWidth: layoutBounds.width - CAVConstants.SCREEN_VIEW_X_MARGIN * 2 - CONTENT_MARGIN * 2 - options.leftMargin
} );

// Explicitly set the local bounds so they don't change. This lets content appear next to the accordion box title.
// TODO: Let's review how the bounds are being used here.
backgroundNode.localBounds = backgroundNode.localBounds.copy();

// Since the title is visible while the accordion box is open, this background will not any area above the bottom of
// the expand/collapse button. To vertically-center things, make a new set of bounds that includes the missing space.
// Values come from the height of the expand/collapse button plus the y margin above and below it. Also add the
Expand Down

0 comments on commit 2452bd6

Please sign in to comment.