Skip to content

Commit 0ce35c3

Browse files
AmirMohammad CheraghaliAmirMohammad Cheraghali
authored andcommitted
fix: Add custom hover tooltip to viewport headers
1 parent 3e02ba7 commit 0ce35c3

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

src/App.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,12 +1442,16 @@ function App() {
14421442
</span>
14431443
</div>
14441444
<div className="flex items-center gap-3 flex-1 min-w-0 justify-center">
1445-
<span
1446-
className="text-[10px] text-neutral-400 font-mono truncate max-w-full"
1447-
title={ctrl.proteinTitle || ctrl.pdbId || (ctrl.file ? ctrl.file.name : "No Structure")}
1448-
>
1449-
{ctrl.proteinTitle || ctrl.pdbId || (ctrl.file ? ctrl.file.name : "No Structure")}
1450-
</span>
1445+
<div className="relative group flex-1 min-w-0">
1446+
<span
1447+
className="text-[10px] text-neutral-400 font-mono truncate max-w-full block"
1448+
>
1449+
{ctrl.proteinTitle || ctrl.pdbId || (ctrl.file ? ctrl.file.name : "No Structure")}
1450+
</span>
1451+
<div className="absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-neutral-900 text-white text-[10px] rounded whitespace-nowrap opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-50 border border-neutral-700">
1452+
{ctrl.proteinTitle || ctrl.pdbId || (ctrl.file ? ctrl.file.name : "No Structure")}
1453+
</div>
1454+
</div>
14511455
<button
14521456
onClick={(e) => { e.stopPropagation(); ctrl.handleResetView(); }}
14531457
className="p-1 hover:bg-white/10 rounded text-neutral-500 hover:text-white transition-colors shrink-0"

0 commit comments

Comments
 (0)