directed-graph-creator icon indicating copy to clipboard operation
directed-graph-creator copied to clipboard

Can you update to d3 version 4?

Open paulocoutinhox opened this issue 7 years ago • 8 comments

Hi,

Can you update to d3 version 4?

Thanks.

paulocoutinhox avatar Jul 28 '17 00:07 paulocoutinhox

I am trying to do it https://stackoverflow.com/questions/45801254/migrating-to-d3-v4-cause-duplicates-on-drag

one2gov avatar Aug 21 '17 15:08 one2gov

Hi, @one2gov Trying to do upgrading in my own project found some issue with the dragging behavior. D3 V4 prevents "circle mouse up" to fire as default when you drag a line from one circle to another. Do you have any good suggestion to get info of circle in V4 that was recognized in circle mouse up event in V3 implementation?

guanw avatar Oct 09 '17 21:10 guanw

@one2gov Actually I was able to fix this by looping through all nodes to find the one that's connected in "end" callback. Now I have a similar issue with edges like your stack overflow question: https://stackoverflow.com/questions/45801254/migrating-to-d3-v4-cause-duplicates-on-drag. When I started to drag it renders lots of paths during dragging. Now I have to check how to make this disappeared..

guanw avatar Oct 10 '17 15:10 guanw

@one2gov looks like path.enter() will get fired even when I'm dragging the big circle here. I changed .data() for path a little bit and it magically makes infinite paths disappeared.

guanw avatar Oct 10 '17 17:10 guanw

@guanw thx for sharing! I am really stuck with this one) I'll try to finish my attempt on stackoverflow.

one2gov avatar Oct 11 '17 08:10 one2gov

@guanw and @one2gov did you guys manage to port this?

ghamarian avatar Aug 27 '18 10:08 ghamarian

I ported this library to d3, version 5.7. You can find it here: https://github.com/ghamarian/graph_editor

ghamarian avatar Aug 29 '18 11:08 ghamarian

For anyone still looking for a solution, I've posted mine here (as an answer)

https://stackoverflow.com/questions/45801254/migrating-to-d3-v4-cause-duplicates-on-drag/54773054#54773054

faso avatar Feb 19 '19 18:02 faso