Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lasso tool for 2d node/edge selection #520

Open
ZackUhlenhuth opened this issue Jun 7, 2024 · 0 comments
Open

Lasso tool for 2d node/edge selection #520

ZackUhlenhuth opened this issue Jun 7, 2024 · 0 comments

Comments

@ZackUhlenhuth
Copy link

ZackUhlenhuth commented Jun 7, 2024

Is your feature request related to a problem? Please describe.
It's difficult to select multiple nodes in a force graph without some kind of multi select tool. A lasso selection tool would be great to accomplish this.

Describe the solution you'd like
When holding down control or holding down right click, it'd be great to make use of d3 lasso in order to lasso select things on the canvas. See this example for how this could work
https://observablehq.com/@bumbeishvili/d3-lasso-selection

Perhaps it doesn't need to be a native feature of the react-force-graph library, but an example of how to create a simple lasso select would be great.

Describe alternatives you've considered
NA

Additional context
Ideally the library could expose the lasso selection in some way wherein the library user could just make use of a "lassoSelectedItems" state variable to either get selected nodes or edges or both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant