Skip to content

Commit

Permalink
allows line break before '?' and add comments to prevent misunderstan…
Browse files Browse the repository at this point in the history
…ding
  • Loading branch information
bryan-brancotte committed May 5, 2021
1 parent e8b11b9 commit 5a8e4b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/tree-reusable-d3.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ function interactive_tree() {
.call(zoom);
var vis = svg.append("svg:g");

var tooltip = (d3.select("body").select("div.tooltip").empty()
?d3.select("body").append("div")
:d3.select("body").select("div.tooltip")
/* jshint -W014 */
var tooltip = (d3.select("body").select("div.tooltip").empty() /* if no div.tooltip*/
?d3.select("body").append("div") /* then create one */
:d3.select("body").select("div.tooltip") /* otherwise use existing div.tooltip */
)
.attr("class", "tooltip")
.style("opacity", 0)
Expand Down

0 comments on commit 5a8e4b0

Please sign in to comment.