diff --git a/src/item/HitResult.js b/src/item/HitResult.js index fc89f987..f4a43189 100644 --- a/src/item/HitResult.js +++ b/src/item/HitResult.js @@ -80,7 +80,8 @@ HitResult = Base.extend(/** @lends HitResult# */{ */ /** - * The hit point. + * Describes the actual coordinates of the segment, handle or bounding box + * corner that was hit. * * @property * @name HitResult#point diff --git a/src/path/Path.js b/src/path/Path.js index 31f1cd92..a39c6268 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -1240,10 +1240,13 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ segment._transformCoordinates(matrix, coords); for (var j = ends || options.segments ? 0 : 2, m = !ends && options.handles ? 6 : 2; j < m; j += 2) { - if (point.getDistance(coords[j], coords[j + 1]) < tolerance) + if (point.getDistance(coords[j], coords[j + 1]) < tolerance) { return new HitResult(j == 0 ? 'segment' - : 'handle-' + (j == 2 ? 'in' : 'out'), - that, { segment: segment }); + : 'handle-' + (j == 2 ? 'in' : 'out'), that, { + segment: segment, + point: Point.create(coords[j], coords[j + 1]) + }); + } } } if (options.ends && !options.segments && !this._closed) {