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

Added callback for node position change. #227

Closed
wants to merge 0 commits into from

Conversation

jiriproX
Copy link

@jiriproX jiriproX commented Sep 9, 2019

It can be used for storing of new node position after drag & drop of node.

Signed-off-by: Jiri Prokes jirix.x.prokes@intel.com

Copy link
Owner

@danielcaldas danielcaldas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there @jiriproX! Thanks a lot for your contribution, I think this will give a lot more of power to users who want to track node position changes! There are just some small details we need to improve on the implementation, but overall is looking good.

Also if possible, would you mind adding a callback to the sandbox/Sandbox.jsx so that developers can see it in action in the [live demo(https://goodguydaniel.com/react-d3-graph/sandbox/index.html)? Nothing fancy just console.loging the node position when dragged.

src/components/graph/Graph.jsx Outdated Show resolved Hide resolved
src/components/graph/Graph.jsx Outdated Show resolved Hide resolved
src/components/graph/Graph.jsx Outdated Show resolved Hide resolved
@jiriproX
Copy link
Author

Thanks for valuable comments.

@jiriproX
Copy link
Author

I can't find console.log output in "live demo". So, coordinates of changed position are not visible for me.

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

Successfully merging this pull request may close these issues.

None yet

2 participants