Skip to content

Commit

Permalink
Fix event listener mask can't be set if node is not in the hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
pandamicro committed Aug 19, 2016
1 parent 722f1a0 commit 7345fc9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cocos2d/core/CCNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7345fc9

Please sign in to comment.