Handle non-reversible matrix in Item#hitTest()

Closes #617
This commit is contained in:
Jürg Lehni 2015-12-27 16:20:28 +01:00
parent f2f34c3b75
commit b724a59901

View file

@ -1746,8 +1746,8 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
);
// Transform point to local coordinates.
point = matrix._inverseTransform(point);
if (!this._children && !this.getInternalRoughBounds()
// If the matrix is non-reversible, point will now be `null`:
if (!point || !this._children && !this.getInternalRoughBounds()
.expand(tolerancePadding.multiply(2))._containsPoint(point))
return null;
// Filter for type, guides and selected items if that's required.