Fix Path#hitTest() to only consider strokeWidth if a strokeColor is provided too.

This commit is contained in:
Jürg Lehni 2011-11-12 19:48:39 +01:00
parent 6e5a81f907
commit ddf7c6534b

View file

@ -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