mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fix native node targetOff (#13122)
This commit is contained in:
@@ -318,6 +318,7 @@ nodeProto.hasEventListener = function (type: string, callback?, target?: unknown
|
||||
};
|
||||
|
||||
nodeProto.targetOff = function (target: string | unknown) {
|
||||
this._eventProcessor.targetOff(target);
|
||||
// Check for event mask reset
|
||||
if ((this._eventMask & TRANSFORM_ON) && !this._eventProcessor.hasEventListener(NodeEventType.TRANSFORM_CHANGED)) {
|
||||
this._eventMask &= ~TRANSFORM_ON;
|
||||
|
||||
Reference in New Issue
Block a user