4
0
mirror of https://github.com/cwinfo/yggdrasil-map synced 2025-06-27 03:59:23 +00:00

size nodes by their betweenness, use nodedb for giving hosts names

This commit is contained in:
Michał Zieliński
2015-07-28 14:04:14 +02:00
parent e0f1c67c1b
commit f4fc407f8e
3 changed files with 41 additions and 7 deletions

View File

@ -175,7 +175,8 @@ function showNodeInfo(node) {
'<span class="tt">' + node.id + '</span><br>' +
'<br>' +
'<strong>Version:</strong> ' + node.version + '<br>' +
'<strong>Peers:</strong> ' + node.peers.length + '<br>' +
'<strong>Peers:</strong> ' + node.peers.length + '<br>' +
'<strong>Centrality:</strong> ' + node.centrality + '<br>' +
'<table>' +
// '<tr><td></td><td><strong>Their peers #</strong></td></tr>' +
peers.map(function (n) {
@ -210,7 +211,7 @@ $(document).ready(function() {
var node = nodes[i];
node.x = node.x * 1.2;
node.y = node.y * 1.2;
node.radius = 4 + node.size * 10;
node.radius = node.size;
node.hover = false;
node.selected = false;
node.edges = [];
@ -399,7 +400,7 @@ $(document).ready(function() {
// node.x *= ratio;
// node.y *= ratio;
// node.radius *= ratio;
node.radius = (4 + node.size * 8) * zoom;
node.radius = (node.size) * zoom;
}
drawNetwork();
@ -417,4 +418,4 @@ function nodeMouseIn(node) {
function nodeMouseOut(node) {
node.hover = false;
$('body').css('cursor', 'auto');
}
}