Skip to content

Commit

Permalink
Merge pull request #18 from seiwonpark/fix/tooltip-layer
Browse files Browse the repository at this point in the history
fix. tooltip arrow position
  • Loading branch information
seiwonpark authored Feb 2, 2025
2 parents fee5c65 + c5e9917 commit 596ac7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Cell/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Tooltip = ({ content, offsetX, targetRect, fontSize = 12 }: TooltipProps)
pointerEvents: 'none',
fontSize: `${fontSize}px`,
left: `${targetRect.left + offsetX}px`,
top: `${targetRect.top - 40}px`,
top: `${targetRect.top - 16 - fontSize - ~~(fontSize / 10)}px`,
}

const arrowStyle: CSSProperties = {
Expand All @@ -39,7 +39,7 @@ const Tooltip = ({ content, offsetX, targetRect, fontSize = 12 }: TooltipProps)
borderTop: '6px solid #25292E',
pointerEvents: 'none',
left: `${targetRect.left + targetRect.width / 2 - 6}px`,
top: `${targetRect.top - 18}px`,
top: `${targetRect.top - 8}px`,
}

return createPortal(
Expand Down
1 change: 0 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
includeBoundary: true,
}}
styleOptions={{
textColor: '#1f2328',
theme: 'grass',
cx: 12,
cy: 12,
Expand Down

0 comments on commit 596ac7b

Please sign in to comment.