I want to programmatically fire the "end" event of d3-drag. I have some circles and have the drag-handling of them implemented like so:
...
.call(d3.drag()
.on("drag", function () {...})
.on("end", function () {...})
)
Now, later in my code, I would like to trigger the "end" part of this programmatically.
I have already tried something like this:
d3.select("#myID").dispatch("end");
d3.select("#myID").dispatch("dragend");
d3.select("#myID").call(d3.drag().dispatch("end"));