Skip to content

Commit

Permalink
remove workaround for issue in Dialog that has been fixed, see phetsi…
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jul 28, 2017
1 parent 81dd017 commit afa80b1
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions js/lab/view/OutOfBallsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ define( function( require ) {
// modules
var Dialog = require( 'JOIST/Dialog' );
var inherit = require( 'PHET_CORE/inherit' );
var Panel = require( 'SUN/Panel' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var plinkoProbability = require( 'PLINKO_PROBABILITY/plinkoProbability' );
var Text = require( 'SCENERY/nodes/Text' );
Expand All @@ -26,24 +25,17 @@ define( function( require ) {
function OutOfBallsDialog( options ) {

options = _.extend( {
modal: true
modal: true,
xMargin: 60,
yMargin: 50
}, options );

var messageNode = new Text( outOfBallsString, {
font: new PhetFont( 25 ),
maxWidth: 350
} );

// WORKAROUND: An intermediate panel is needed to work around a problem that occurs when using
// xMargin and yMargin options for Dialog. See https://github.com/phetsims/joist/issues/346
var dialogContent = new Panel( messageNode, {
fill: null,
stroke: null,
xMargin: 40,
yMargin: 30
} );

Dialog.call( this, dialogContent, options );
Dialog.call( this, messageNode, options );
}

plinkoProbability.register( 'OutOfBallsDialog', OutOfBallsDialog );
Expand Down

0 comments on commit afa80b1

Please sign in to comment.