diff --git a/display/display.css b/display/display.css index 1c8ece4dc92fbb7ed9c7a4a9e9fce8e00ce105d9..463915f26a861a926eba0e0d097b6ccde7267eda 100644 --- a/display/display.css +++ b/display/display.css @@ -302,10 +302,10 @@ } .neighbor-content-links { - padding: 0 18px; + padding: 5px; display: none; overflow: hidden; - background-color: #000000; - flex-direction: row; + background-color: #ffffff; + flex-direction: column; overflow-x: auto; } diff --git a/display/overlays/neighbors.js b/display/overlays/neighbors.js index 55cb627bb86b7168b98d7f2d8c7e83e46bac9328..c706426eec45375a5d062a5456fe03f21f98ffd2 100644 --- a/display/overlays/neighbors.js +++ b/display/overlays/neighbors.js @@ -1,6 +1,5 @@ import * as Helpers from "../helpers"; import jQuery from "jquery"; -import * as Config from "../../config"; export { NodeNeighborOverlay }; @@ -41,7 +40,9 @@ class NodeNeighborOverlay { "neighbor-content-tabs", bottomContainerDiv ); + coll.style.display = "flex"; this.contentTab = contentTabs; + contentTabs.style.display = "flex"; coll.addEventListener("click", function() { if(contentTabs.style.display === "flex") { contentTabs.style.display = "none"; @@ -104,22 +105,10 @@ class NodeNeighborOverlay { */ createReference(target) { const linkDiv = document.createElement("div"); - linkDiv.className = "link-img"; - - if ("image" in target) { - const linkImage = document.createElement("img"); - linkImage.src = - Config.PLUGIN_PATH + "datasets/images/" + target.image; - linkDiv.appendChild(linkImage); - } - - if ("name" in target) { - Helpers.createHTMLElement("p", linkDiv, { - className: "bottom-container-link-text", - innerText: target.name, - }); - } - + var linkText = document.createTextNode("- " + target.name); + linkDiv.appendChild(linkText); + linkDiv.style.margin = "2px"; + linkDiv.style.cursor = "pointer"; jQuery(linkDiv).on("click", () => { this.graph.focusOnNode(target); this.infoOverlay.updateInfoOverlay(target); @@ -133,10 +122,6 @@ class NodeNeighborOverlay { */ updateTabs(node) { this.clearTabContentPages(); - if(this.contentTab.style.display === "flex") { - this.contentTab.style.display = "none"; - } - for (const link of node.links) { const target = link.source == node ? link.target : link.source; const reference = this.createReference(target);