Include point property in stroke hit-results.

This commit is contained in:
Jürg Lehni 2013-12-11 17:10:32 +01:00
parent 25d8b1f0d2
commit d176acfc53

View file

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