From 2fce61ce60d59fc34b2d9cb34cd32eb5c627c07b Mon Sep 17 00:00:00 2001 From: jbphet Date: Wed, 4 Nov 2015 16:04:19 -0700 Subject: [PATCH] performance optimization - made the bounds computation 'unstroked', see https://github.com/phetsims/arithmetic/issues/117 --- js/StarNode.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/StarNode.js b/js/StarNode.js index f05ef1df9..d7c41d00a 100644 --- a/js/StarNode.js +++ b/js/StarNode.js @@ -49,14 +49,16 @@ define( function( require ) { stroke: options.emptyStroke, fill: options.emptyFill, lineWidth: options.emptyLineWidth, - lineJoin: options.emptyLineJoin + lineJoin: options.emptyLineJoin, + boundsMethod: 'unstroked' // optimization for faster creation and usage } ) ); this.addChild( new Path( new StarShape( options ), { stroke: options.filledStroke, fill: options.filledFill, lineWidth: options.filledLineWidth, - lineJoin: options.filledLineJoin + lineJoin: options.filledLineJoin, + boundsMethod: 'unstroked' // optimization for faster creation and usage } ) ); this.mutate( options );