Compare commits

..

No commits in common. "f9dec8a947c74f126c1e2c007df89448778e4b21" and "d471ab197afa7f7458711be271daffef162e098c" have entirely different histories.

View file

@ -3,7 +3,6 @@ const CONFIG = {
'nodeSize': 16, 'nodeSize': 16,
'baseUrl': 'https://www.securityvision.io/wiki/index.php/', 'baseUrl': 'https://www.securityvision.io/wiki/index.php/',
'dataUrl': 'semantic_data.json', 'dataUrl': 'semantic_data.json',
'preSimulate': true, // run simulation before starting, so we don't start with lines jumping around
'labels': { 'labels': {
'rotate': true, 'rotate': true,
}, },
@ -130,7 +129,7 @@ function buildGraph(data) {
.iterations(2) // increase to make more rigid .iterations(2) // increase to make more rigid
) )
.force("charge", d3.forceManyBody() .force("charge", d3.forceManyBody()
.strength(-40) .strength(-50)
) )
.force("center", d3.forceCenter(width / 2, height / 2)) .force("center", d3.forceCenter(width / 2, height / 2))
.force("collision", d3.forceCollide(function (d) { .force("collision", d3.forceCollide(function (d) {
@ -301,15 +300,6 @@ function buildGraph(data) {
}); });
// simulate the first bit without drawing, so we don't have the 'jumping' graph in the beginning
if (CONFIG.preSimulate) {
for (var i = 0, n = Math.ceil(Math.log(simulation.alphaMin()) / Math.log(1 - simulation.alphaDecay())); i < n; ++i) {
simulation.tick();
}
}
return svg.node(); return svg.node();
} }