Skip to content

Commit

Permalink
Background added to massNodes so all svg elements are painted. #278.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denz1994 committed May 29, 2018
1 parent e064486 commit dd93392
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/common/view/MassNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ define( function( require ) {
} );
this.addChild( this.hookNode );

// Background added so all of svg elements are painted. See https://github.com/phetsims/masses-and-springs/issues/278
this.background = new Rectangle( this.bounds.dilated( 1.10 ), { pickable: false } );
this.addChild( this.background );

if ( !mass.icon ) {
var labelString = mass.mysteryLabel ? questionMarkString : StringUtils.fillIn( massValueString, { mass: mass.mass * 1000 } );
var label = new Text( labelString, {
Expand Down
1 change: 1 addition & 0 deletions js/lab/view/PeriodTraceNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ define( function( require ) {
// second line
this.shape.verticalLineTo( state === 2 ? currentYPosition : secondPeakYPosition + this.path.lineWidth / 2 );
if ( state > 2 && !this.periodTrace.thresholdReached ) {

// second connector
this.shape.horizontalLineTo( this.lastX );

Expand Down

0 comments on commit dd93392

Please sign in to comment.