You are not calling the "dragend"
event on this.force.drag
here.
This also depends on how you have defined this.force.drag
.
This should work for you
myCustomDrag = d3.behavior.drag()
.on("dragstart", function(d,i){
//do something when drag has just started
})
.on("drag", function(d,i){
//do something while dragging
})
.on("dragend", function(d,i){
//do something just after drag has ended
});
In the above code, just use call(myCustomDrag)
on an element (circle here) on which you want this drag behaviour to be present.