From d176acfc537e47066154cde93ffb01daad06ebe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 11 Dec 2013 17:10:32 +0100 Subject: [PATCH] Include point property in stroke hit-results. --- src/path/Path.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/path/Path.js b/src/path/Path.js index 4bfa94c5..4eb8bd69 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -1896,7 +1896,12 @@ var Path = PathItem.extend(/** @lends Path# */{ return !loc && hasFill && this._contains(point) || loc && !hasStroke ? new HitResult('fill', this) : loc - ? new HitResult('stroke', this, { location: loc }) + ? new HitResult('stroke', this, { + location: loc, + // It's fine performance wise to call getPoint() again + // since it was already called before. + point: loc.getPoint() + }) : null; }