mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 18:42:40 +08:00
Fix event listener mask can't be set if node is not in the hierarchy
This commit is contained in:
@@ -969,6 +969,12 @@ var Node = cc.Class({
|
||||
// activate
|
||||
cc.director.getActionManager().resumeTarget(this);
|
||||
cc.eventManager.resumeTarget(this);
|
||||
if (this._touchListener) {
|
||||
this._touchListener.mask = _searchMaskParent(this);
|
||||
}
|
||||
if (this._mouseListener) {
|
||||
this._mouseListener.mask = _searchMaskParent(this);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// deactivate
|
||||
|
||||
Reference in New Issue
Block a user