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# */{
306
306
* @param {Number } localZOrder
307
307
*/
308
308
setLocalZOrder : function ( localZOrder ) {
309
+ if ( localZOrder === this . _localZOrder )
310
+ return ;
309
311
if ( this . _parent )
310
312
this . _parent . reorderChild ( this , localZOrder ) ;
311
313
else
@@ -1365,9 +1367,6 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
1365
1367
cc . log ( cc . _LogInfos . Node_reorderChild_2 ) ;
1366
1368
return ;
1367
1369
}
1368
- if ( zOrder === child . zIndex ) {
1369
- return ;
1370
- }
1371
1370
cc . renderer . childrenOrderDirty = this . _reorderChildDirty = true ;
1372
1371
child . arrivalOrder = cc . s_globalOrderOfArrival ;
1373
1372
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# */{
278
278
return ;
279
279
}
280
280
281
- if ( zOrder === child . zIndex )
282
- return ;
283
-
284
281
// no reordering if only 1 child
285
282
if ( this . _children . length > 1 ) {
286
283
var getIndexes = this . _getCurrentIndex ( child , zOrder ) ;
You can’t perform that action at this time.
0 commit comments