You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My situation is that I have multiple polylines/polygons with circles at each point, and when I click a circle I'd like the polyline to move appropriately. I don't have any id's/className's on any polyline, and the circles are being caught via d3.event.
I have a version of this working (somewhat) at the moment but there are few issues:
My cursor, if moving too fast, will stop dragging the previously-dragged circle
The circle, if it gets too close to another point with a circle on it, will stop moving the point that I was originally moving and instead move the point that I'm close to.
Sometimes, circles are completely dragged off the line and unable to rejoin the line.
I'm confused about how to get drag and drop to work with d3/react and if this is even a potentially fruitful pursuit. Would appreciate some help.
The text was updated successfully, but these errors were encountered:
If the drag behavior is only listening to your circles, then if the mouse “escapes” a circle, you’ll stop receiving mouse events and drag will stop. So typically you need to put something in the background to capture mouse events, such as a rect with fill: none and pointer-events: all.
Please use Stack Overflow tag d3.js to ask for help. Although I make an effort to assist everyone that asks, I am not always available to provide help promptly or directly. Stack Overflow provides a better collaborative forum for self-help: tens of thousands of D3-related questions have already been asked there, and some answered questions may be relevant to you.
When asking for help, please include a link to a live example that demonstrates the issue, preferably on bl.ocks.org. It is often impossible to debug from code snippets alone. Isolate the issue and reduce your code as much as possible before asking for help. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response.
If you have a question about D3’s behavior and want to discuss it with other users, also consider the d3-js Google Group or joining the d3-js Slack.
My situation is that I have multiple polylines/polygons with circles at each point, and when I click a circle I'd like the polyline to move appropriately. I don't have any id's/className's on any polyline, and the circles are being caught via d3.event.
I have a version of this working (somewhat) at the moment but there are few issues:
I'm confused about how to get drag and drop to work with d3/react and if this is even a potentially fruitful pursuit. Would appreciate some help.
The text was updated successfully, but these errors were encountered: