From 92ebdc558066913a30ea89492d656a93395c7275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tao=20Bror=20Bojl=C3=A9n?= Date: Sun, 18 Aug 2019 17:16:01 +0200 Subject: [PATCH] show instance type in tooltip --- frontend/src/components/molecules/Cytoscape.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/molecules/Cytoscape.tsx b/frontend/src/components/molecules/Cytoscape.tsx index ea2211e..468e5ae 100644 --- a/frontend/src/components/molecules/Cytoscape.tsx +++ b/frontend/src/components/molecules/Cytoscape.tsx @@ -13,7 +13,7 @@ import { SELECTED_NODE_COLOR } from "../../constants"; import { IColorScheme } from "../../types"; -import { getBuckets } from "../../util"; +import { getBuckets, getTypeDisplayString } from "../../util"; const CytoscapeContainer = styled.div` width: 100%; @@ -54,12 +54,12 @@ class Cytoscape extends React.PureComponent { // Setup node tooltip on hover this.cy.nodes().forEach(n => { - const domain = n.data("id"); + const tooltipContent = `${n.data("id")} (${getTypeDisplayString(n.data("type"))})`; const ref = (n as any).popperRef(); const t = tippy(ref, { animateFill: false, animation: "fade", - content: domain, + content: tooltipContent, duration: 100, trigger: "manual" });