cagin
cagin

Reputation: 5920

How to disable click event after drag stop in d3.js tree

I want to disable click event after drag stop. Here is my click event :

function click(d) {

            if (contextDiv) {
                contextDiv.remove();
            }

            if (d.children) {
                d._children = d.children;
                d.children = null;
            } else {
                d.children = d._children;
                d._children = null;
            }
            update(d);
        }

Do you have any suggestion? I don't use Jquery.

Upvotes: 2

Views: 1905

Answers (1)

kmandov
kmandov

Reputation: 3209

You can use d3.event.stopPropagation();

Check out the d3 Drag Behavior API Reference

Here is an example: http://bl.ocks.org/jasondavies/3186840

Upvotes: 2

Related Questions