remove link.distance/strength, tweak parameters

This commit is contained in:
Nils Schneider 2012-06-07 22:58:45 +02:00
commit 80c2cd394b
4 changed files with 22 additions and 12 deletions

View file

@ -160,8 +160,20 @@ var force = d3.layout.force()
.friction(0.75)
.theta(0.1)
.size([w, h])
.linkDistance(function (d) { return d.distance; })
.linkStrength(function (d) { return d.strength; })
.linkDistance(function (d) {
switch (d.type) {
case "vpn": return 150
case "client": return 20
default: return 70
}
})
.linkStrength(function (d) {
switch (d.type) {
case "vpn": return 0.15
case "client": return 1
default: return 0.5
}
})
force.on("tick", function() {
var size = force.size()