function drawNode(enter) {
const node = enter
.append("g")
.attr("name", (d) => d.data.name)
.attr("transform", (d) => `translate(0,${d.index * nodeSize})`)
.attr("opacity", (d) => (!showOnlyDOM || d.data.isDOM ? 1 : 0));
const nodeCircles = node
.append("circle")
.attr("r", 0)
.attr("cx", (d) => d.depth * nodeSize)
.attr("fill", nodeCircleFill)
.attr("stroke", "black")
.transition()
.duration(450)
.attr("r", 3);
node
.append("text")
.attr("dy", "0.32em")
.attr("x", (d) => d.depth * nodeSize + 6)
.attr("stroke", "white")
.attr("stroke-width", 0.2)
.attr("pain-order", "stroke")
.text((d) => `${d.data.name} (${d.data.id})`);
node.append("title").text((d) =>
d
.ancestors()
.reverse()
.map((d) => d.data.name)
.join("/")
);
}