Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 56c88d8

Browse files
authored
feat(graph): show full path while hovering node (#97)
1 parent 359f4ee commit 56c88d8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/client/pages/graph.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const data = computed<Data>(() => {
1313
return {
1414
id: mod.id,
1515
label: path.split('/').splice(-1)[0],
16+
title: path.split('/').splice(-4).join('/'),
1617
group: path.match(/\.(\w+)$/)?.[1] || 'unknown',
1718
size: 15 + Math.min(mod.deps.length / 2, 8),
1819
font: { color: isDark.value ? 'white' : 'black' },

src/client/styles/main.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ html.dark {
4949
transition: none !important;
5050
}
5151

52+
/** vis-network */
53+
.vis-tooltip {
54+
--at-apply: text-black dark:text-white bg-white dark:bg-black;
55+
position: absolute;
56+
border-width: 1px;
57+
border-color: rgba(156,163,175,0.2);
58+
border-radius: 4px;
59+
box-shadow: 0 6px 30px #0000001a;
60+
padding: 4px 8px;
61+
}
62+
5263
/* Markdown */
5364
.n-markdown a {
5465
--at-apply: text-primary hover:underline;

0 commit comments

Comments
 (0)