diff --git a/src/components/tree/reactD3Interface/callbacks.js b/src/components/tree/reactD3Interface/callbacks.js index 276f7aa92..2818a018e 100644 --- a/src/components/tree/reactD3Interface/callbacks.js +++ b/src/components/tree/reactD3Interface/callbacks.js @@ -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: { @@ -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: {}});