-
Notifications
You must be signed in to change notification settings - Fork 21
Bug: Graph re-renders on node status update #12
Comments
Hello @julie-ng ! When the graph is updated, the links of the graph are re-rendered, and it triggers the I do not think we should specify a Would it make sense, during a graph update, to check if the number of nodes changed, and if not, to avoid the re-rendering of the links by commenting the 2 lines here ? If that makes sense, I can prepare a PR. |
By removing the 2 lines here: Everything looks fine (graph init and update, even updates with nodes addition and deletion). |
Hmm interesting find! You're right, theoretically if we are just updating node states, we do not need to redraw links. I think your suggestion is great as a first step, removing those 2 lines makes sense. In the feature, I need to distinguish between updating nodes and links. I'm on vacation now, but maybe next week I will get to this :) |
Otherwise, but I think you are already aware of this, I believe the problem is located here https://github.com/julie-ng/newtonjs-graph/blob/master/newton/graph/views/links.js#L58. |
Hello @julie-ng ! I noticed that the data samples provided by the repository |
Remove webcola engine because it needs to re-render layout entirely on every change, even just status color. See example below.
This leaves default d3 layout engine - for now.
The text was updated successfully, but these errors were encountered: