dotted vpn links and vpn foo

This commit is contained in:
Nils Schneider 2012-06-11 22:11:11 +02:00
parent e63b1a2d8c
commit c539ab0168
3 changed files with 19 additions and 2 deletions

View file

@ -18,6 +18,11 @@
stroke-width: 5px; stroke-width: 5px;
} }
.link.vpn line {
stroke-dasharray: 2.5px 10px;
stroke-linecap: round;
}
.node ellipse { .node ellipse {
fill: #fff; fill: #fff;
stroke: #48f; stroke: #48f;

View file

@ -18,6 +18,11 @@
stroke-width: 1.5px; stroke-width: 1.5px;
} }
.link.vpn line {
stroke-dasharray: 0.75px 4px;
stroke-linecap: round;
}
.link:hover line { .link:hover line {
stroke-width: 5px; stroke-width: 5px;
} }

View file

@ -323,7 +323,9 @@ function update() {
}) })
var linkEnter = link.enter().append("g") var linkEnter = link.enter().append("g")
.attr("class", "link") .attr("class", function(d) {
return "link " + d.type
})
.on("mouseover", function(d) { .on("mouseover", function(d) {
d.source.fixed |= 2 d.source.fixed |= 2
d.target.fixed |= 2 d.target.fixed |= 2
@ -343,9 +345,14 @@ function update() {
.style("stroke", function(d) { .style("stroke", function(d) {
return linkcolor(d.quality) return linkcolor(d.quality)
}) })
link.selectAll("title") link.selectAll("title")
.text( function (d) { .text( function (d) {
return d.quality var s = d.quality
if (d.type)
s += " (" + d.type + ")"
return s
}) })
link.exit().remove() link.exit().remove()