If you\'re revisiting this question I\'ve moved all the updates to the bottom so it actually reads better as a question.
I\'ve got a bit o
var events = function(g) {
// Register the raw events required
g.on("mousedown.test", mousedown)
.on("mouseenter.test", mouseenter)
.on("mouseleave.test", mouseleave)
.on("click.test", clicked)
.on("contextmenu.test", contextMenu)
.on("dblclick.test", doubleClicked);
return g;
};
Returning g instead of events might resolve the problem.