From c0d11ea98eadb2df8f56766e69d6f8bf30841e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 3 Apr 2014 09:21:12 +0200 Subject: [PATCH] Fix hit-testing of PlacedSymbols. Closes #428 --- src/item/HitResult.js | 4 ++-- src/item/PlacedSymbol.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/item/HitResult.js b/src/item/HitResult.js index 614d84a9..b651843c 100644 --- a/src/item/HitResult.js +++ b/src/item/HitResult.js @@ -109,8 +109,8 @@ var HitResult = Base.extend(/** @lends HitResult# */{ // Use _merged property to not repeatetly merge using new Base in // recursion. return options && options._merged ? options : new Base({ - // Type of item, for instanceof check: 'group', 'layer', 'path', - // 'compound-path', 'shape','raster', 'placed-symbol', ... + // Type of item, for instanceof check: Group, Layer, Path, + // CompoundPath, Shape, Raster, PlacedSymbol, ... type: null, // Tolerance tolerance: paper.settings.hitTolerance, diff --git a/src/item/PlacedSymbol.js b/src/item/PlacedSymbol.js index 38b03a1e..2241d0c7 100644 --- a/src/item/PlacedSymbol.js +++ b/src/item/PlacedSymbol.js @@ -116,7 +116,7 @@ var PlacedSymbol = Item.extend(/** @lends PlacedSymbol# */{ }, _hitTest: function(point, options) { - var res = this._symbol._definition._hitTest(point, options); + var res = this._symbol._definition.hitTest(point, options); // TODO: When the symbol's definition is a path, should hitResult // contain information like HitResult#curve? if (res)