From 2a4d79e499973babda0de5dac0d78b1c135c4ff5 Mon Sep 17 00:00:00 2001 From: Vasek Sraier Date: Sun, 11 Oct 2020 20:48:56 +0200 Subject: [PATCH] graph: added tooltip --- frontend/src/Graph.svelte | 76 ++++++++++++++++++++++++++++++++--- frontend/src/GraphNode.svelte | 4 +- 2 files changed, 72 insertions(+), 8 deletions(-) diff --git a/frontend/src/Graph.svelte b/frontend/src/Graph.svelte index 88ff49a..08d534d 100644 --- a/frontend/src/Graph.svelte +++ b/frontend/src/Graph.svelte @@ -1,11 +1,12 @@
{#if selectionRectangle != null} {/each} + {#if hoveredTask != null && hoveredTask.type == "open-data" } + + + + + {hoveredTask.type == 'open-data' ? hoveredTask.taskReference : "text"} | {tooltipCurrPoints ?? '?'} bod{ "ů yyy"[tooltipCurrPoints ?? 0] ?? "ů" } z {tooltipMaxPoints ?? '?'} + + + {/if} diff --git a/frontend/src/GraphNode.svelte b/frontend/src/GraphNode.svelte index 0dd3419..a26757d 100644 --- a/frontend/src/GraphNode.svelte +++ b/frontend/src/GraphNode.svelte @@ -1,12 +1,10 @@