diff --git a/src/item/Group.js b/src/item/Group.js index 3e05198f..9281bd34 100644 --- a/src/item/Group.js +++ b/src/item/Group.js @@ -167,6 +167,23 @@ var Group = Item.extend(/** @lends Group# */{ child.setClipMask(clipped); }, + _getBounds: function _getBounds(getter, matrix, cacheItem, internal) { + var clipItem = this._getClipItem(), + // We need to fall-back to bounds getter that do not take stroke + // into account + clipBoundsGetter = { + getStrokeBounds: 'getBounds', + getRoughBounds: 'getHandleBounds', + getInternalRoughBounds: 'getInternalBounds' + }; + return clipItem + ? clipItem._getCachedBounds(clipBoundsGetter[getter] || getter, + matrix && matrix.appended(clipItem._matrix), + cacheItem, internal) + : _getBounds.base.call(this, getter, matrix, cacheItem, + internal); + }, + _hitTestChildren: function _hitTestChildren(point, options) { var clipItem = this._getClipItem(); return (!clipItem || clipItem.contains(point))