Take values of translate functions in d3.js

74 Views Asked by At

I am using circle objects and I need to save translate function values. For example

circle3 = container.append("circle")
.attr("transform", "translate(" + 80 + "," + 365 + ")")
.attr("r", 10)
.attr("fill", "gray");

circle2 = container.append("circle")
.attr("transform", "translate(" + 80+ "," + 455+ ")")
.attr("r", 10)
.attr("fill", "gray");

Circle objects are in draggable form. How can I register their new translate value(I mean it will be update after dragging) to variable or arrays. Is there any method provide that values?

Thanks,

0

There are 0 best solutions below