score:1

one problem i can see from the code is in this section:

function clonespeciesmaker(d) {
    var svg = d3.select('svg');
    //original becomes copy
    d3.select(this)
        .classed('original',false)
        .attr('class','copy');
    // creates new 'original' in place
    var data = [{cx:d.cx,cy:d.cy,r:d.r}]; 
    svg.append('circle')
        .data(data)
        .attr('class','original')
        .attr("cx",function(d) {return d.x})
        .attr("cy",function(d) {return d.y})
        .attr("r",function(d) {return d.r})
        .style("fill","purple")
        .attr("class","original")
        .call(dragoriginal);
}

you are setting the data like this

var data = [{cx:d.cx,cy:d.cy,r:d.r}];

but you are doing which is incorrect d.x and d.y is not defined by you in data.

.attr("cx",function(d) {return d.x})
.attr("cy",function(d) {return d.y})

this should have been:

.attr("cx",function(d) {return d.cx})
.attr("cy",function(d) {return d.cy})

Related Query

More Query from same tag