Skip to content

Commit

Permalink
fix options in CreditsNode, #435
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Aug 16, 2017
1 parent 7d518ed commit bf760c3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions js/CreditsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ define( function( require ) {
/**
* Creates node that displays the credits.
* @param {Object} credits - see implementation herein for supported {string} fields
* @param {Object} [options] - Passed to VBox and RichText
* @param {Object} [options]
* @constructor
*/
function CreditsNode( credits, options ) {

options = _.extend( {
align: 'left',
spacing: 1,
maxWidth: 550
}, options );

Expand Down Expand Up @@ -99,11 +101,10 @@ define( function( require ) {
children.push( new RichText( credits.thanks, multiLineTextOptions ) );
}

VBox.call( this, _.extend( {
align: 'left',
spacing: 1,
children: children
}, options ) );
assert && assert( !options.children, 'this node sets its own children' );
options.children = children;

VBox.call( this, options );

this.disposeCreditsNode = function() {
children.forEach( function( child ) {
Expand Down

0 comments on commit bf760c3

Please sign in to comment.