-
Notifications
You must be signed in to change notification settings - Fork 233
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
Graph Rerendering #51
Labels
Comments
Hello @ravisraval! Somewhere along the road, I implemented a So.. new expected behaviours should be
|
danielcaldas
added
bug
enhancement
improving existent functionality or performance related
labels
Feb 15, 2018
Sweet! Looking forward to it. |
Fixed with release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm a big fan of your work on the react-d3-graph, and I'd love a little help! I'm pretty new to programming in general, so apologies for any dumb questions. I'm trying to make a graph that displays & animates several tree traversals (bfs, etc.).
The graph doesn't rerender when I expect it to do so.
For instance, when I change the react component's state to designate the next node (during traversal) to highlight, the state properly updates, but the d3 graph doesn't change. I can see that it's getting the correct data / config, but what's rendered is still the old info. Here's a quick gif of this also happening when I try to change the input that builds the nodes: https://gyazo.com/2a677fc3983ce2acfe59bf7816527cd2
Another example: When I click the Level Order button, it runs the levelOrder function, which does update state.highlightedNode. Even though the state is changed, the node 5 is still green. So I suppose my question is - what exactly makes the graph refresh? Is there a way I can trigger this manually? https://gyazo.com/d71e37e860da27934ca7fa162df8ccd7
Also, I'm trying to get the nodes to render in specific positions, but I keep getting an error thrown when I set staticGraph: true. Does that mean that the only way to hardcode node positions is by removing the ability to add/remove nodes?
Here's the repo: https://github.com/ravisraval/teaching/tree/master
And the file in question: https://github.com/ravisraval/teaching/blob/master/src/components/algorithms/TreeTraversals.jsx
The text was updated successfully, but these errors were encountered: