|
@ -76,12 +76,13 @@ |
|
|
nodes: nodes, |
|
|
nodes: nodes, |
|
|
edges: edges |
|
|
edges: edges |
|
|
}; |
|
|
}; |
|
|
var options = {}; |
|
|
|
|
|
|
|
|
var options = {edges:{widthSelectionMultiplier:1}}; |
|
|
network = new vis.Network(container, data, options); |
|
|
network = new vis.Network(container, data, options); |
|
|
|
|
|
|
|
|
// add event listeners |
|
|
// add event listeners |
|
|
network.on('select', function(params) { |
|
|
network.on('select', function(params) { |
|
|
document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes; |
|
|
document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes; |
|
|
|
|
|
console.log(params) |
|
|
}); |
|
|
}); |
|
|
network.on('stabilized', function (params) { |
|
|
network.on('stabilized', function (params) { |
|
|
document.getElementById('stabilization').innerHTML = 'Stabilization took ' + params.iterations + ' iterations.'; |
|
|
document.getElementById('stabilization').innerHTML = 'Stabilization took ' + params.iterations + ' iterations.'; |
|
|