diff --git a/display/linkoverlay.js b/display/linkoverlay.js index b5f3d0fb78d9ab771ccf65ce061b012e6f8588a2..5d0f084400dc0f735e24c395a5a66ee364ac0c6b 100644 --- a/display/linkoverlay.js +++ b/display/linkoverlay.js @@ -20,9 +20,7 @@ class LinkOverlay { relation.className = 'relation'; relation.edgeType = link; relation.innerHTML = "<p>" + link + "</p>"; - jQuery(relation).click((event) => - this.graph.toggleLinkVisibility(event.currentTarget.edgeType) - ); + jQuery(relation).click((event) => this.toggleLinkVisibility(event)); overlayNode.appendChild(relation); const colorStrip = document.createElement('div'); @@ -32,5 +30,14 @@ class LinkOverlay { } } + toggleLinkVisibility(event) { + const target = event.currentTarget; + this.graph.toggleLinkVisibility(target.edgeType) + if (getComputedStyle(target).opacity == 1.0) { + target.style.opacity = 0.4; + } else { + target.style.opacity = 1.0; + } + } } \ No newline at end of file diff --git a/kg-style.css b/kg-style.css index 9cae94666e04d3a64cfa2cfde3409d965560969e..3549aebf369d41669da21aeaeaf5631d97e2d2e7 100644 --- a/kg-style.css +++ b/kg-style.css @@ -141,6 +141,7 @@ z-index: 100; cursor: pointer; pointer-events: all; + opacity: 1.0; } .rel-container {