mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
parent
68c4541844
commit
6797d2eb11
1 changed files with 17 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue