Closed MrMartiniMo closed 4 years ago
By passing the "this" context, it is possible to query the mouse event.
Example:
dTree.init(jsonData, { target: "#target", callbacks: { nodeClick: function (name, extra, id) { console.log(d3.mouse(this)) }, nodeRightClick: function (name, extra, id) { console.log(d3.mouse(this)) }, } })
I made a separate commit (36a036efcd2e56f93736a61f7dc694d7afe390f1) fixing this issue. Thanks for the help!
By passing the "this" context, it is possible to query the mouse event.
Example: