Skip to content

Commit

Permalink
feat: Added stroke change on hover for EFP tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukthiw committed Dec 16, 2023
1 parent eaefae0 commit f9265aa
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Eplant/views/eFP/Tooltips/EFPTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,19 @@ function SVGTooltip(props: {
React.useEffect(() => {
const enterListener = () => {
setOpen(true)
props.el?.firstElementChild?.setAttribute('stroke-width', '1.5')
props.el?.firstElementChild?.setAttribute(
'stroke',
theme.palette.secondary.contrastText,
)
}
const leaveListener = () => {
setOpen(false)
props.el?.firstElementChild?.setAttribute('stroke-width', '0.5')
props.el?.firstElementChild?.setAttribute(
'stroke',
theme.palette.secondary.dark,
)
}
if (props.el) {
props.el.addEventListener('mouseenter', enterListener)
Expand Down Expand Up @@ -102,7 +112,7 @@ function SVGTooltip(props: {
</TableCell>
<TableCell sx={{ borderBottom: 'none' }}>
{Math.log2(
props.tissue.mean / (props.data.control ?? 1)
props.tissue.mean / (props.data.control ?? 1),
).toFixed(2)}
</TableCell>
</TableRow>
Expand Down

0 comments on commit f9265aa

Please sign in to comment.