Skip to content

Commit

Permalink
Increasing performance for unstroked Line bounds, see phetsims/arithm…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Nov 17, 2015
1 parent c12edfd commit 5639d49
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/nodes/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,11 @@ define( function( require ) {
}
}
else {
// it might have a fill?
return Path.prototype.computeShapeBounds.call( this );
// It might have a fill? Just include the fill bounds for now.
var fillBounds = Bounds2.NOTHING.copy();
fillBounds.addCoordinates( this._x1, this._y1 );
fillBounds.addCoordinates( this._x2, this._y2 );
return fillBounds;
}
},

Expand Down

0 comments on commit 5639d49

Please sign in to comment.