Fix hit-test for compound paths again.

This commit is contained in:
Jürg Lehni 2013-10-20 01:54:20 +02:00
parent ddeacb1763
commit e6ef5e7e17

View file

@ -228,10 +228,15 @@ var CompoundPath = PathItem.extend(/** @lends CompoundPath# */{
Base.merge(options, { fill: false }));
// If asked to query all children seperately, perform the same loop as
// Item#hitTest() now on the compound children.
if (!res && options.compoundChildren) {
if (!res) {
if (options.compoundChildren) {
var children = this._children;
for (var i = children.length - 1; i >= 0 && !res; i--)
res = children[i]._hitTest(point, options);
} else if (options.fill && this.hasFill()
&& this._contains(point)) {
res = new HitResult('fill', this);
}
}
return res;
},