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

New freezeAllDragEvents configuration property to prevent node drag-and-drop #388

Merged
merged 4 commits into from
Nov 17, 2020
Merged

New freezeAllDragEvents configuration property to prevent node drag-and-drop #388

merged 4 commits into from
Nov 17, 2020

Conversation

Antrikshy
Copy link
Contributor

Hello and happy Hacktoberfest!

I implemented the resolution to the feature request in #308 that @danielcaldas described. It seems to work in that the nodes are frozen, but the entire graph still can be panned around and zoomed into. Let me know if the idea was to block those drag events as well (I can't tell with certainty from the discussion), and I can try to tackle this further.

@Antrikshy
Copy link
Contributor Author

Ok I think I achieved what was originally asked for. The new prop also disables panning and zooming, while leaving graph elements clickable.

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.

Thanks for the PR! 👏 Sorry I could not make it during Hacktoberfest. If you're still up to move this one forward, please consider my comments.

sandbox/graph-config-tooltips.js Outdated Show resolved Hide resolved
src/components/graph/Graph.jsx Outdated Show resolved Hide resolved
src/components/graph/graph.config.js Show resolved Hide resolved
tools/graph-config-jsdoc.json Outdated Show resolved Hide resolved
@Antrikshy
Copy link
Contributor Author

Sorry I could not make it during Hacktoberfest.

That's fine, with the new restrictions, I wasn't really going for it.

I'll try to update the PR later today.

@Antrikshy
Copy link
Contributor Author

I tried manually pulling out older versions of those sandbox/ and tools/ auto-generated files from previous commits, but for some reason, two of them still appear modified in "Files changed".

@lironhl
Copy link
Contributor

lironhl commented Nov 16, 2020

I tried manually pulling out older versions of those sandbox/ and tools/ auto-generated files from previous commits, but for some reason, two of them still appear modified in "Files changed".

Try running:

  1. git remote add github https://github.com/danielcaldas/react-d3-graph.git

  2. git checkout github/master -- tools/ and then git checkout github/master -- sandbox/

  3. git commit -m "restore files" -n

Explanation:
You'll restore the files to their state in this repository in the master branch, then you'll commit the changes without running the post commit hook.

@Antrikshy
Copy link
Contributor Author

Ah so the post commit hook was to blame after all?

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.

👍

@danielcaldas danielcaldas merged commit bdff657 into danielcaldas:master Nov 17, 2020
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

3 participants