I have a D3JS worldmap where I draw circle elements with different radius.
Now my problem is in the zoom function where I specify r3, so everytime i zoom all my circles get resized to 3 first and scale then down/up.
How can I specify the current radius?
function zoomed() {
const currentTransform = d3.event.transform;
g.attr("transform", currentTransform);
g.selectAll("circle")
.attr("r", 3 - (currentTransform.k / 3.7))
}