File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -306,6 +306,8 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
306306 * @param {Number } localZOrder
307307 */
308308 setLocalZOrder : function ( localZOrder ) {
309+ if ( localZOrder === this . _localZOrder )
310+ return ;
309311 if ( this . _parent )
310312 this . _parent . reorderChild ( this , localZOrder ) ;
311313 else
@@ -1365,9 +1367,6 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
13651367 cc . log ( cc . _LogInfos . Node_reorderChild_2 ) ;
13661368 return ;
13671369 }
1368- if ( zOrder === child . zIndex ) {
1369- return ;
1370- }
13711370 cc . renderer . childrenOrderDirty = this . _reorderChildDirty = true ;
13721371 child . arrivalOrder = cc . s_globalOrderOfArrival ;
13731372 cc . s_globalOrderOfArrival ++ ;
Original file line number Diff line number Diff line change @@ -278,9 +278,6 @@ cc.ParticleBatchNode = cc.Node.extend(/** @lends cc.ParticleBatchNode# */{
278278 return ;
279279 }
280280
281- if ( zOrder === child . zIndex )
282- return ;
283-
284281 // no reordering if only 1 child
285282 if ( this . _children . length > 1 ) {
286283 var getIndexes = this . _getCurrentIndex ( child , zOrder ) ;
You can’t perform that action at this time.
0 commit comments