infobox: handle directional links
This commit is contained in:
parent
d13b032b61
commit
f354a6fbc7
3 changed files with 7 additions and 4 deletions
|
|
@ -100,8 +100,8 @@ function (moment, Router, L, GUI, numeral) {
|
|||
})
|
||||
|
||||
links.forEach( function (d) {
|
||||
d.source.node.neighbours.push({ node: d.target.node, link: d })
|
||||
d.target.node.neighbours.push({ node: d.source.node, link: d })
|
||||
d.source.node.neighbours.push({ node: d.target.node, link: d, incoming: false })
|
||||
d.target.node.neighbours.push({ node: d.source.node, link: d, incoming: true })
|
||||
if (!d.vpn) {
|
||||
d.source.node.meshlinks = d.source.node.meshlinks ? d.source.node.meshlinks + 1 : 1
|
||||
d.target.node.meshlinks = d.target.node.meshlinks ? d.target.node.meshlinks + 1 : 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue