|
@@ -97,22 +97,23 @@ export class Button extends Rectangle {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- let processObservables = true;
|
|
|
if (this.delegatePickingToChildren) {
|
|
|
- processObservables = false;
|
|
|
+ let contains = false;
|
|
|
for (var index = this._children.length - 1; index >= 0; index--) {
|
|
|
var child = this._children[index];
|
|
|
if (child.isEnabled && child.isHitTestVisible && child.isVisible && !child.notRenderable && child.contains(x, y)) {
|
|
|
- processObservables = true;
|
|
|
+ contains = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (processObservables) {
|
|
|
- this._processObservables(type, x, y, pointerId, buttonIndex);
|
|
|
+ if (!contains) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ this._processObservables(type, x, y, pointerId, buttonIndex);
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|