Skip to content
Snippets Groups Projects
Commit 1677041e authored by Matthias Konitzny's avatar Matthias Konitzny :fire:
Browse files

Added better visibility for toggled edge types.

parent c77a9af9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -141,6 +141,7 @@
z-index: 100;
cursor: pointer;
pointer-events: all;
opacity: 1.0;
}
.rel-container {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment