File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -822,8 +822,7 @@ cc.SpriteBatchNode = cc.Node.extend(/** @lends cc.SpriteBatchNode# */{
822
822
j = i - 1 ;
823
823
824
824
//continue moving element downwards while zOrder is smaller or when zOrder is the same but orderOfArrival is smaller
825
- while ( j >= 0 && ( tempItem . getZOrder ( ) < this . _children [ j ] . getZOrder ( ) ||
826
- ( tempItem . getZOrder ( ) == this . _children [ j ] . getZOrder ( ) && tempItem . getOrderOfArrival ( ) < this . _children [ j ] . getOrderOfArrival ( ) ) ) ) {
825
+ while ( j >= 0 && ( tempItem . getZOrder ( ) < this . _children [ j ] . getZOrder ( ) || ( tempItem . getZOrder ( ) == this . _children [ j ] . getZOrder ( ) && tempItem . getOrderOfArrival ( ) < this . _children [ j ] . getOrderOfArrival ( ) ) ) ) {
827
826
this . _children [ j + 1 ] = this . _children [ j ] ;
828
827
j -- ;
829
828
}
@@ -838,11 +837,11 @@ cc.SpriteBatchNode = cc.Node.extend(/** @lends cc.SpriteBatchNode# */{
838
837
var index = 0 ;
839
838
//fast dispatch, give every child a new atlasIndex based on their relative zOrder (keep parent -> child relations intact)
840
839
// and at the same time reorder descedants and the quads to the right index
841
- if ( cc . renderContextType == cc . WEBGL ) {
840
+ // if (cc.renderContextType == cc.WEBGL) {
842
841
for ( i = 0 ; i < this . _children . length ; i ++ ) {
843
842
index = this . _updateAtlasIndex ( this . _children [ i ] , index ) ;
844
843
}
845
- }
844
+ // }
846
845
}
847
846
848
847
this . _reorderChildDirty = false ;
You can’t perform that action at this time.
0 commit comments