Retrieve DOM target from drag callback when `this` is not available

Viewed 2129

The documentation for d3.drag states the DOM element target of the drag event will be available in this to the callback:

When a specified event is dispatched, each listener will be invoked with the same context and arguments as selection.on listeners: the current datum d and index i, with the this context as the current DOM element.

But my call back is an object instance and this points to that object. So I need another way of accessing the current DOM element that is normally passed in this. How can I do it?

1 Answers
Related