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

onDoubleClickNode #194

Closed
henzesberger opened this issue Apr 11, 2019 · 5 comments
Closed

onDoubleClickNode #194

henzesberger opened this issue Apr 11, 2019 · 5 comments

Comments

@henzesberger
Copy link

@henzesberger henzesberger commented Apr 11, 2019

Describe the solution you'd like
I'd like to have an onDoubleClickNode event, similar to onClickNode or onRightClickNode

Describe your use case
I'd like to be able to call a function when a user double-clicks a node in the graph.
In this case, onClickNode should not be called.

Additional context
Tried to implement it myself using a simple copy and replace approach but it didn't work because the onClickNode is always called.

Double-click in D3

@danielcaldas

This comment has been minimized.

Copy link
Owner

@danielcaldas danielcaldas commented Apr 25, 2019

Thanks for the suggestion. This should be fairly easy to implement within our Node component. You just need to make sure that the callback is exposed through the react-d3-graph Graph API so that people can actually provide the callback through the top level API. If you want to give it a try, I would recommend you to look into mdn dblclick event and simply implement a call to some handler in the Node component. This is something interesting to have that does not harm the react-d3-graph API at all.

Thanks for the suggestion.

@IgorMacGregor

This comment has been minimized.

Copy link
Contributor

@IgorMacGregor IgorMacGregor commented May 7, 2019

Hello,
I would like to work on that issue ! :)

@danielcaldas

This comment has been minimized.

Copy link
Owner

@danielcaldas danielcaldas commented May 9, 2019

Hello @IgorMacGregor, awesome, thanks for that. Tagged the issue with in progress

@stale stale bot added the wontfix label Jun 18, 2019
Repository owner deleted a comment from stale bot Jun 20, 2019
@stale stale bot removed the wontfix label Jun 20, 2019
@danielcaldas danielcaldas self-assigned this Jun 20, 2019
@danielcaldas

This comment has been minimized.

Copy link
Owner

@danielcaldas danielcaldas commented Jun 20, 2019

This was merged, it will be included in the next release of react-d3-graph. Thanks a lot for your contribution @IgorMacGregor 🎉 @henzesberger @LonelyPrincess stay tuned 🙂

@danielcaldas

This comment has been minimized.

Copy link
Owner

@danielcaldas danielcaldas commented Jun 23, 2019

Released in 2.1.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.