Need to make two different operations one for single click and other for double click.single click is working but for double click it is going to single click function then goees to double click function.how to stop single click function firing when double click happens or how to capture the event type single or double..please help!!!
according to the example ,i am using as shown below..it is the right way?
var nodeEnter = node.enter()
.append("g")
.attr("class","node")
.attr("transform", function(d) {
return "translate(" + source.x0 + "," + (-(source.y0)) + ")";
}).on('click', click);
function click{
var cc = clickcancel();
cc.on('click', function() {
addDetailsDiv(d.id, d.name, d.type);
});
cc.on('dblclick', function() {
dblclick();
});