4
0
mirror of https://github.com/cwinfo/yggdrasil-map synced 2025-06-26 11:39:23 +00:00

Use multiple nodes

This commit is contained in:
Vanhala Antti
2014-03-22 00:55:16 +02:00
parent 380e7bb3dd
commit 2203cc1138
3 changed files with 116 additions and 42 deletions

View File

@ -73,7 +73,7 @@ function drawNetwork() {
for (var i = 0; i < nodes.length; ++i) {
var node = nodes[i];
if (node.radius > 2 || node.selected || node.hover) {
if (node.radius > 4 || node.selected || node.hover) {
var fontSize = 4 + node.radius * 0.4;
drawText(ctx, node.x, node.y - node.radius - 1,
@ -135,8 +135,8 @@ function markPeers(node, depth) {
// var colors = ['#000000', '#333333', '#555555', '#777777', '#999999', '#BBBBBB', '#DDDDDD'];
// var colors = ['#000000', '#29BBFF', '#09E844', '#FFBD0F', '#FF5E14', '#FF3C14', '#FF7357', '#FF9782', '#FFC8BD', '#FFE6E0'];
var colors = ['#000000', '#096EE8', '#09E8B8', '#36E809', '#ADE809', '#E8B809', '#E87509', '#E83A09'];
var txtCol = ['#000000', '#032247', '#034537', '#0E3D02', '#354703', '#403203', '#3D1F02', '#3B0E02'];
var colors = ['#000000', '#096EE8', '#09E8B8', '#36E809', '#ADE809', '#E8B809', '#E87509', '#E83A09', '#E86946', '#E8AC9B', '#E8C9C1'];
var txtCol = ['#000000', '#032247', '#034537', '#0E3D02', '#354703', '#403203', '#3D1F02', '#3B0E02', '#3B0E02', '#3B0E02', '#3B0E02'];
// var colors = ['#000000', '#064F8F', '#068F81', '#068F38', '#218F06', '#6F8F06', '#8F7806', '#8F5106'];
// var colors = ['#FFFFFF', '#29BBFF', '#17FF54', '#FFBD0F', '#FF3C14', '#590409'];
node.color = (depth >= colors.length) ? '#FFFFFF' : colors[depth];

View File

@ -10,6 +10,7 @@
html, body {
font-family: 'Source Sans Pro';
background: #F5F5F5;
overflow: hidden;
}
#header {
@ -99,7 +100,8 @@ li {
/*bottom: 0;*/
min-width: 200px;
z-index: 999;
/*overflow-y: scroll;*/
/*overflow-y: auto;*/
/*overflow: hidden;*/
font-size: 12px;
}
@ -135,6 +137,11 @@ h2 {
color: #29BBFF;
}
#node-info {
/*position: absolute;*/
/*overflow-y: scroll;*/
/*background: rgba(220, 220, 220, 0.8);*/
}
#node-info table {
width: 100%;
}