changed result json

This commit is contained in:
Ruben van de Ven 2021-08-13 11:57:57 +02:00
parent ea9862eddc
commit 4c325af655

View file

@ -6,7 +6,7 @@ const CONFIG = {
'nodeRadius': 5, 'nodeRadius': 5,
'nodeRepositionPadding': 12, 'nodeRepositionPadding': 12,
'baseUrl': 'https://www.securityvision.io/wiki/index.php/', 'baseUrl': 'https://www.securityvision.io/wiki/index.php/',
'dataUrl': 'result3.json', 'dataUrl': 'remote_biometric_identification.json',
'preSimulate': false, // run simulation before starting, so we don't start with lines jumping around 'preSimulate': false, // run simulation before starting, so we don't start with lines jumping around
'labels': { 'labels': {
'rotate': true, 'rotate': true,
@ -367,6 +367,8 @@ class NodeMap {
this.resizeEvent = window.addEventListener('resize', this.resize.bind(this)); this.resizeEvent = window.addEventListener('resize', this.resize.bind(this));
this.tooltipEl = document.getElementById('tooltip'); this.tooltipEl = document.getElementById('tooltip');
this.selectedNode = null; this.selectedNode = null;
document.getElementById('closeSelection').addEventListener('click', (ev) => this.deselectNode());
} }
resize() { resize() {
@ -841,6 +843,8 @@ class NodeMap {
links.forEach(l => document.getElementById(getLinkId(l)).classList.add('linkedSelected')); links.forEach(l => document.getElementById(getLinkId(l)).classList.add('linkedSelected'));
this.container.classed('selectedNode', true); this.container.classed('selectedNode', true);
document.body.classList.add('selectedNode');
// TODO: show details; // TODO: show details;
// alert('not yet implemented'); // alert('not yet implemented');
@ -857,6 +861,7 @@ class NodeMap {
els[0].classList.remove('linkedSelected'); els[0].classList.remove('linkedSelected');
} }
this.container.classed('selectedNode', false); this.container.classed('selectedNode', false);
document.body.classList.remove('selectedNode');
} }
update() { update() {