File tree Expand file tree Collapse file tree 1 file changed +10
-28
lines changed Expand file tree Collapse file tree 1 file changed +10
-28
lines changed Original file line number Diff line number Diff line change @@ -3549,37 +3549,19 @@ cc.NodeCanvas = cc.Class.extend(/** @lends cc.NodeCanvas# */{
35493549 if ( len > 0 ) {
35503550 this . sortAllChildren ( ) ;
35513551 // draw children zOrder < 0
3552- /*var tag = children[0]._zOrder,tmpTag;
3553- if(tag >= 0){
3554- this.draw();
3552+ for ( i = 0 ; i < len ; i ++ ) {
3553+ child = children [ i ] ;
3554+ if ( child . _zOrder < 0 )
3555+ child . visit ( context ) ;
3556+ else
3557+ break ;
35553558 }
3556- for(i = 0; i < len;i++){
3559+ this . draw ( context ) ;
3560+ for ( ; i < len ; i ++ ) {
35573561 child = children [ i ] ;
3558- tmpTag = child._zOrder;
3559- if(tmpTag>=0 && tag < 0){
3560- this.draw();
3561- }
3562- child.visit(context);
3563- tag = tmpTag;
3562+ if ( child . _zOrder >= 0 )
3563+ child . visit ( context ) ;
35643564 }
3565- if(tag<0){
3566- this.draw();
3567- }*/
3568-
3569- for ( i = 0 ; i < len ; i ++ ) {
3570- child = children [ i ] ;
3571- if ( child . _zOrder < 0 )
3572- child . visit ( context ) ;
3573- else
3574- break ;
3575- }
3576- this . draw ( context ) ;
3577- for ( ; i < len ; i ++ ) {
3578- child = children [ i ] ;
3579- if ( child . _zOrder >= 0 )
3580- child . visit ( context ) ;
3581- }
3582-
35833565 } else
35843566 this . draw ( context ) ;
35853567
You can’t perform that action at this time.
0 commit comments