www/js/visuility.js
// Checks whether link already exists in links or not
Checks whether link already exists in links or not
Checks whether link already exists in links or not
function addLink(link) {
    var linkMap = links.map(function(d) { return d.source.id+"-"+d.target.id; });
    if (linkMap.indexOf(link.source.id+"-"+link.target.id) === -1
     && linkMap.indexOf(link.target.id+"-"+link.source.id) === -1) {
         if (!link.source.parent && nodeTypes[link.source.type].offset && link.chain) link.source.parent = link.target;                        
        links.push(link);
    }
}
function addLink ( link ) { var linkMap = links . map ( function ( d ) { return d . source . id + "-" + d . target . id ; } ) ; if ( linkMap . indexOf ( link . source . id + "-" + link . target . id ) === - 1 && linkMap . indexOf ( link . target . id + "-" + link . source . id ) === - 1 ) { if ( ! link . source . parent && nodeTypes [ link . source . type ] . offset && link . chain ) link . source . parent = link . target ; links . push ( link ) ; } }
Checks whether link already exists in links or not
Checks whether link already exists in links or not
//console.log("added link "+link.sourceId+"-"+link.targetId);