1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| this.branch( root, rootNode );
},
branch: function( root, rootNode ) {
var childNodes = root.childNodes;
for( var i=0, l=childNodes.length; i<l; i++ ){
if( childNodes[i].nodeName == "node" ) {
var node = new DataGraphNode( false );
node.parent = rootNode;
var mass = childNodes[i].getAttribute("mass");
node.mass = mass;
var label1 = childNodes[i].getAttribute("label1");
node.label1 = label1;
var label2 = childNodes[i].getAttribute("label2");
node.label2 = label2;
var idimage = childNodes[i].getAttribute("idimage");
node.idimage = idimage;
this.dataGraph.addNode( node );
this.branch( childNodes[i], node );
} |
Partager