Skip to content

Commit

Permalink
feat: Append Tooltip to body
Browse files Browse the repository at this point in the history
...to be able to use it inside e.g. modal without being cut.
  • Loading branch information
bprusinowski committed Jul 9, 2023
1 parent a6c4dc1 commit c4f721e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/Tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { select } from "d3-selection";
export type Tooltip = ReturnType<typeof makeTooltip>;

export const makeTooltip = (div: HTMLDivElement) => {
const root = select(div)
.selectAll(".tooltip")
const root = select(document.body)
.selectAll(".plotteus-tooltip")
.data([null])
.join("div")
.attr("class", "tooltip")
.attr("class", "plotteus-tooltip")
.style("z-index", "999999")
.style("position", "fixed")
.style("top", 0)
.style("left", 0)
Expand Down

0 comments on commit c4f721e

Please sign in to comment.