日期:2014-05-18  浏览次数:20584 次

关于树的遍历的算法。
我想写一个把树整齐排列的算法,并画到界面上,怎么一上午没写明白。哎..谁来帮帮我。

    function layout1(rootNode,x,y){
     var child=scene.getChilds(rootNode);
     for(var i=0;i<child.length;i++){
     layout1(child[i],x+150,36*i+y);
     }
     rootNode.setLocation(x,y);
    }

------解决方案--------------------
帮顶



------解决方案--------------------
zTree就可以,你可以看下