Skip to content

Commit b2c1542

Browse files
authored
Merge pull request #3431 from pandamicro/develop
Fix local z order not being set when node doesn’t have a parent issue
2 parents 92278e7 + 73b2b3c commit b2c1542

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cocos2d/core/base-nodes/CCNode.js

+2
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
308308
setLocalZOrder: function (localZOrder) {
309309
if (this._parent)
310310
this._parent.reorderChild(this, localZOrder);
311+
else
312+
this._localZOrder = localZOrder;
311313
cc.eventManager._setDirtyForNode(this);
312314
},
313315

cocos2d/core/platform/CCConfig.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ window["CocosEngine"] = cc.ENGINE_VERSION = "Cocos2d-JS v3.14";
5656
* @constant
5757
* @type {Number}
5858
*/
59-
cc.FIX_ARTIFACTS_BY_STRECHING_TEXEL = 0;
59+
cc.FIX_ARTIFACTS_BY_STRECHING_TEXEL = 1;
6060

6161
/**
6262
* Position of the FPS (Default: 0,0 (bottom-left corner))<br/>

0 commit comments

Comments
 (0)