tweak force paramameters for work better with large meshes
parent
51eadf12c0
commit
52b6aa8804
|
@ -245,7 +245,7 @@ var force = d3.layout.force()
|
||||||
if (d.flags.client)
|
if (d.flags.client)
|
||||||
return -30
|
return -30
|
||||||
|
|
||||||
return -200
|
return -100
|
||||||
})
|
})
|
||||||
.gravity(0.035)
|
.gravity(0.035)
|
||||||
.friction(0.73)
|
.friction(0.73)
|
||||||
|
@ -253,16 +253,15 @@ var force = d3.layout.force()
|
||||||
.size([w, h])
|
.size([w, h])
|
||||||
.linkDistance(function (d) {
|
.linkDistance(function (d) {
|
||||||
switch (d.type) {
|
switch (d.type) {
|
||||||
case "vpn": return 200
|
|
||||||
case "client": return 20
|
case "client": return 20
|
||||||
default: return 70
|
default: return 70
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.linkStrength(function (d) {
|
.linkStrength(function (d) {
|
||||||
switch (d.type) {
|
switch (d.type) {
|
||||||
case "vpn": return 0.05
|
case "vpn": return 0.01
|
||||||
case "client": return 1
|
case "client": return 1
|
||||||
default: return 0.8
|
default: return 0.5
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue