Skip to content

Commit d7c817b

Browse files
committed
remove tool tip hover for first snapshot in history link
1 parent 1c882fc commit d7c817b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/app/components/StateRoute/History.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ function History(props: Record<string, unknown>): JSX.Element {
265265
}
266266
})
267267
.on('mouseenter', function (event, d) {
268+
if (d.data.index === 0) return;
268269
d3.selectAll('.tooltip').remove();
269270
const [x, y] = d3.pointer(event);
270271
if (d3.selectAll('.tooltip')._groups['0'].length === 0) {

src/app/styles/components/d3graph.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
/* Tooltip styling */
7474
div.tooltip {
7575
position: absolute;
76-
padding: 12px 16px;
76+
padding: 12px;
7777
color: #374151;
7878
z-index: 100;
7979
font-family: 'Outfit', sans-serif;
@@ -85,13 +85,10 @@ div.tooltip {
8585
0 4px 6px -1px rgba(0, 0, 0, 0.1),
8686
0 2px 4px -1px rgba(0, 0, 0, 0.06);
8787
border-radius: 8px;
88-
max-width: 300px;
89-
transition: all 200ms ease;
88+
max-width: 250px;
9089
}
9190

9291
/* Container styling */
9392
.display {
9493
background-color: #f9fafb;
95-
height: 100%;
96-
overflow: auto;
9794
}

0 commit comments

Comments
 (0)