mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Fix Path#hitTest() to only consider strokeWidth if a strokeColor is provided too.
This commit is contained in:
parent
6e5a81f907
commit
ddf7c6534b
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue