diff --git a/src/item/Item.js b/src/item/Item.js index 508caaf1..8ae693bb 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -1049,13 +1049,15 @@ function(name) { */ hitTest: function(point, options) { options = HitResult.getOptions(point, options); - point = options.point = this._matrix._inverseTransform(options.point); // Check if the point is withing roughBounds + tolerance, but only if // this item does not have children, since we'd have to travel up the // chain already to determine the rough bounds. if (!this._children && !this.getRoughBounds() - .expand(options.tolerance)._containsPoint(point)) + .expand(options.tolerance)._containsPoint(options.point)) return null; + // Transform point to local coordinates but use untransformed point + // for bounds check above. + point = options.point = this._matrix._inverseTransform(options.point); if ((options.center || options.bounds) && // Ignore top level layers: !(this instanceof Layer && !this._parent)) {