gwtd3 / gwt-d3

A GWT wrapper library around the d3.js library
Other
131 stars 53 forks source link

Bug on D3.eventAsCoords() #101

Closed jeremee closed 10 years ago

jeremee commented 10 years ago

The Coords object returned by D3.eventAsCoords() is wrong. The implementation of this method should be something like this: return { x : $wnd.d3.event.x, y : $wnd.d3.event.y };

anthonime commented 10 years ago

Hi Jeremee,

The D3.eventAsCoords() method, used in the context of a Drag behaviour, only works when called in the scope of a Drag event listener. It can not be called in the scope of a DragStart or DragEnd event listener, as stated by the documentation of d3.js (https://github.com/mbostock/d3/wiki/Drag-Behavior#on)