Skip to content

Commit

Permalink
Include options with super, see #601
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisklus committed Mar 18, 2020
1 parent 1904eca commit fb26c3e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions js/HomeScreenButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ class HomeScreenButton extends VBox {
tandem: options.tandem.createTandem( 'text' )
} );

// The children are needed in the VBox constructor, but the rest of the options should be mutated later.
super( { children: [ iconWithFrame, text ] } );
super( merge( { children: [ iconWithFrame, text ] }, options ) );

// sets the opacity of the icon and fill of the text
const setOpacityAndFill = () => {
Expand Down Expand Up @@ -163,8 +162,6 @@ class HomeScreenButton extends VBox {
this.on( 'bounds', () => {
this.mouseArea = this.touchArea = this.localBounds; // cover the gap in the VBox between the frame and text
} );

this.mutate( options );
}
}

Expand Down

0 comments on commit fb26c3e

Please sign in to comment.