From ddf7c6534be9afc57b21e6dcb66eb4a900ca2ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 12 Nov 2011 19:48:39 +0100 Subject: [PATCH] Fix Path#hitTest() to only consider strokeWidth if a strokeColor is provided too. --- src/path/Path.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/path/Path.js b/src/path/Path.js index a39c6268..55292fe0 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -1229,7 +1229,8 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ _hitTest: function(point, options, matrix) { var tolerance = options.tolerance || 0, - radius = (options.stroke ? this.getStrokeWidth() / 2 : 0) + tolerance, + radius = (options.stroke && this.getStrokeColor() + ? this.getStrokeWidth() / 2 : 0) + tolerance, loc, res; // If we're asked to query for segments, ends or handles, do all that