d3 / d3-drag

Drag and drop SVG, HTML or Canvas using mouse or touch input.

Home Page:https://d3js.org/d3-drag

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extending d3 drag behaviour to enable dragover detection

AhmedFattahSyd opened this issue · comments

It seems that D3.drag supports drag but not "drop" i.e. it does not enable the generation of dragenter, dragleave and dragover events. I can get object created by D3 to listen to these events but cannot make a D3 object 'draggable' not access the drag event property. Is this because you disable the default dag behaviour?

Here's the code that demonstrate the above.
https://stackoverflow.com/questions/47318662/d3-support-for-dragenter-and-dragleave-events

I'd like to extend the d3 darg to enable elements created with d3 to generate the dragover, etc events but not sure how or if this would interfere with the current behaviour.

Thanks

d3-drag does not use the HTML Drag and Drop API; it just happens to have the same name. d3-drag only supports mouse and touch events at the moment.