Fix Bug of multiple circles over each other.
This commit is contained in:
parent
5a4ff1cfda
commit
87ab5ae194
|
|
@ -68,12 +68,13 @@ const radius = Math.min(width, height) / 2.4;
|
||||||
function render() {
|
function render() {
|
||||||
const arrowStrokeWidth = 2;
|
const arrowStrokeWidth = 2;
|
||||||
|
|
||||||
const svg = d3
|
const svg = d3.select(".circle-visualization");
|
||||||
.select(".circle-visualization")
|
// Clean svg before adding new stuff.
|
||||||
.attr("viewBox", `0 0 ${width} ${height}`);
|
svg.selectAll("*").remove();
|
||||||
|
|
||||||
// Append markter as definition to the svg
|
// Append marker as definition to the svg
|
||||||
svg
|
svg
|
||||||
|
.attr("viewBox", `0 0 ${width} ${height}`)
|
||||||
.append("svg:defs")
|
.append("svg:defs")
|
||||||
.append("svg:marker")
|
.append("svg:marker")
|
||||||
.attr("id", "triangle")
|
.attr("id", "triangle")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue