remove unnecessary regex, use encodeuri for label instead of replace

This commit is contained in:
Blake Allen
2021-10-26 16:58:08 -07:00
parent 7f9f9dca8a
commit c457f0af60
5 changed files with 5 additions and 10 deletions

View File

@ -184,7 +184,7 @@
const labels = graphNode.append("text")
.attr("dx", 12)
.attr("dy", ".35em")
.text((d) => d.id.replace("%20", " "))
.text((d) => encodeURI(d.id))
.style("opacity", 0)
.style("pointer-events", "none")
.call(drag(simulation));