mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Support type: Class
filters in hit-testing code too.
This commit is contained in:
parent
61c2b11938
commit
eea4e533a4
2 changed files with 4 additions and 4 deletions
|
@ -1773,7 +1773,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
_getChildHitTestOptions: function(options) {
|
_getChildHitTestOptions: function(options) {
|
||||||
// This is overriden in CompoundPath, for treatment of type === 'path'.
|
// This is overridden in CompoundPath, for treatment of type === 'path'.
|
||||||
return options;
|
return options;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -236,9 +236,9 @@ var CompoundPath = PathItem.extend(/** @lends CompoundPath# */{
|
||||||
}, /** @lends CompoundPath# */{
|
}, /** @lends CompoundPath# */{
|
||||||
_getChildHitTestOptions: function(options) {
|
_getChildHitTestOptions: function(options) {
|
||||||
// If we're not specifically asked to returns paths through
|
// If we're not specifically asked to returns paths through
|
||||||
// options.type == 'path' do not test children for fill, since a
|
// options.type == Path, do not test children for fill, since a
|
||||||
// compound path forms one shape.
|
// compound path forms one shape. Also support legacy format 'path'
|
||||||
return options.type === 'path'
|
return options.type === Path || typeof type === 'path'
|
||||||
? options
|
? options
|
||||||
: new Base(options, { fill: false });
|
: new Base(options, { fill: false });
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue