public/javascripts/yui/datatable/datatable.js
function(row, tmpRowDepth) {
                tmpRowDepth = tmpRowDepth || 1;

                for(var n=0; n<row.length; n++) {
                    var col = row[n];
                    // Column has children, so keep counting
                    if(YAHOO.lang.isArray(col.children)) {
                        tmpRowDepth++;
                        countMaxRowDepth(col.children, tmpRowDepth);
                        tmpRowDepth--;
                    }
                    // No children, is it the max depth?
                    else {
                        if(tmpRowDepth > maxRowDepth) {
                            maxRowDepth = tmpRowDepth;
                        }
                    }

                }
            }
function(row, tmpRowDepth) {
                tmpRowDepth = tmpRowDepth || 1;

                for(var n=0; n<row.length; n++) {
                    var col = row[n];
                    // Column has children, so keep counting
                    if(YAHOO.lang.isArray(col.children)) {
                        tmpRowDepth++;
                        countMaxRowDepth(col.children, tmpRowDepth);
                        tmpRowDepth--;
                    }
                    // No children, is it the max depth?
                    else {
                        if(tmpRowDepth > maxRowDepth) {
                            maxRowDepth = tmpRowDepth;
                        }
                    }

                }
            }
function ( row , tmpRowDepth ) { tmpRowDepth = tmpRowDepth || 1 ; for ( var n = 0 ; n < row . length ; n ++ ) { var col = row [ n ] ; // Column has children, so keep counting if ( YAHOO . lang . isArray ( col . children ) ) { tmpRowDepth ++ ; countMaxRowDepth ( col . children , tmpRowDepth ) ; tmpRowDepth -- ; } // No children, is it the max depth? else { if ( tmpRowDepth > maxRowDepth ) { maxRowDepth = tmpRowDepth ; } } } }
Calculate the max depth of descendants for this row
Calculate the max depth of descendants for this row