Skip to content

Commit

Permalink
Restore on-hover tip radius change
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshadfield committed Feb 5, 2024
1 parent 62edb38 commit 5d556b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/tree/reactD3Interface/callbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const onTipHover = function onTipHover(d) {
const phylotree = d.that.params.orientation[0] === 1 ?
this.state.tree :
this.state.treeToo;
phylotree.svg.select(getDomId("#tip", d.n.name))
phylotree.svg.select("#"+getDomId("tip", d.n.name))
.attr("r", (e) => e["r"] + 4);
this.setState({
selectedNode: {
Expand Down Expand Up @@ -133,8 +133,8 @@ export const onTipLeave = function onTipLeave(d) {
const phylotree = d.that.params.orientation[0] === 1 ?
this.state.tree :
this.state.treeToo;
if (!this.state.selectedNode) {
phylotree.svg.select(getDomId("#tip", d.n.name))
if (this.state.selectedNode) {
phylotree.svg.select("#"+getDomId("tip", d.n.name))
.attr("r", (dd) => dd["r"]);
}
this.setState({selectedNode: {}});
Expand Down

0 comments on commit 5d556b7

Please sign in to comment.