From ee595065804a8ae77032666f6cf46d5959bba9de Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Tue, 12 Jul 2016 14:35:28 +0800 Subject: [PATCH] fix jsb ECS hirarchy not change issue --- cocos2d/core/utils/base-node.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cocos2d/core/utils/base-node.js b/cocos2d/core/utils/base-node.js index 40349e9480..ab37a9b146 100644 --- a/cocos2d/core/utils/base-node.js +++ b/cocos2d/core/utils/base-node.js @@ -265,11 +265,15 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{ this._localZOrder = value; this._sgNode.zIndex = value; - if (!CC_JSB && this._parent) { + if(this._parent) { this._parent._reorderChildDirty = true; this._parent._delaySort(); - cc.eventManager._setDirtyForNode(this); + + if (!CC_JSB) { + cc.eventManager._setDirtyForNode(this); + } } + } } },