From 5639d497903912ae576ea17adb8f980a741bcfe2 Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Mon, 16 Nov 2015 23:20:21 -0700 Subject: [PATCH] Increasing performance for unstroked Line bounds, see https://github.com/phetsims/arithmetic/issues/117 --- js/nodes/Line.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/nodes/Line.js b/js/nodes/Line.js index aec827f11..c1c45358f 100644 --- a/js/nodes/Line.js +++ b/js/nodes/Line.js @@ -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; } },