Skip to content

Commit

Permalink
fixup! Add tree-related types
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Nov 1, 2024
1 parent 3cf6768 commit 2af5974
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/components/tree/phyloTree/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,16 @@ export interface Params {
tipStrokeWidth: number
}

type NodeCallback = (d: PhyloNode) => void

export interface Callbacks {
onTipHover: (d: PhyloNode) => void
onTipLeave: (d: PhyloNode) => void
onTipClick: (d: PhyloNode) => void
onBranchHover: (d: PhyloNode) => void
onBranchLeave: (d: PhyloNode) => void
onBranchClick: (d: PhyloNode) => void
tipLabel: (d: PhyloNode) => void
onTipHover: NodeCallback
onTipLeave: NodeCallback
onTipClick: NodeCallback
onBranchHover: NodeCallback
onBranchLeave: NodeCallback
onBranchClick: NodeCallback
tipLabel: NodeCallback
}

export type Metadata = {
Expand Down

0 comments on commit 2af5974

Please sign in to comment.