Skip to content

Commit

Permalink
Remove QuestionBar merge, see: #48
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Jun 28, 2022
1 parent 116d179 commit b7aec4c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions js/common/view/MeanShareAndBalanceScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import EmptyObjectType from '../../../../phet-core/js/types/EmptyObjectType.js';
import PickRequired from '../../../../phet-core/js/types/PickRequired.js';
import { AlignBox, GridBox, Node, Text, VBox } from '../../../../scenery/js/imports.js';
import meanShareAndBalanceStrings from '../../meanShareAndBalanceStrings.js';
import merge from '../../../../phet-core/js/merge.js';
import QuestionBar from '../../../../scenery-phet/js/QuestionBar.js';
import Bounds2 from '../../../../dot/js/Bounds2.js';
import RectangularPushButton from '../../../../sun/js/buttons/RectangularPushButton.js';
Expand All @@ -43,10 +42,13 @@ export default class MeanShareAndBalanceScreenView extends ScreenView {

super( options );

//TODO https://github.com/phetsims/mean-share-and-balance/issues/48 eliminate merge by combining object literals
this.questionBar = new QuestionBar( this.layoutBounds, this.visibleBoundsProperty, merge( {
tandem: options.tandem.createTandem( 'questionBar' )
}, { labelText: meanShareAndBalanceStrings.introQuestion, barFill: '#2496D6' } ) );
// TODO: Can QuestionBar be built in a way that allows changing barFill and labelText after construction?
// see: https://github.com/phetsims/scenery-phet/issues/751
this.questionBar = new QuestionBar( this.layoutBounds, this.visibleBoundsProperty, {
tandem: options.tandem.createTandem( 'questionBar' ),
labelText: meanShareAndBalanceStrings.introQuestion,
barFill: '#2496D6'
} );

const playAreaBounds = new Bounds2( this.layoutBounds.minX, this.layoutBounds.minY + this.questionBar.height,
this.layoutBounds.maxX, this.layoutBounds.maxY );
Expand Down

0 comments on commit b7aec4c

Please sign in to comment.