fkling / JSNetworkX

Build, process and analyze graphs in JavaScript (port of NetworkX)
https://felix-kling.de/jsnetworkx/
Other
757 stars 185 forks source link

d3.event.sourceEvent is null #51

Closed iliocatallo closed 8 years ago

iliocatallo commented 9 years ago

Hi,

Unfortunately, I think that a recent change in D3 (see https://github.com/mbostock/d3/issues/2411) has broken the rendering procedure of JSNetworkX. Specifically, in:

https://github.com/fkling/JSNetworkX/blob/master/src/drawing/svg.js#L375

d3.event.sourceEvent should be probably tested against null. If I got it right, sourceEvent has even been removed from newer versions of D3. For now, I'm preventing the dblclick.zoom event by doing:

d3.select('svg.jsnx').on('dblclick.zoom', null);

Thanks.

fkling commented 9 years ago

Thanks for the report! I'm currently on vacation but will take a look as soon as possible.