-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Node drawn on top of circuit when using hierarchical layout. Gives misleading circuit paths. #2311
Comments
@redcameron I see the problem, but how would you expect the graph to look in a hierarchical layout? |
I would expect that the graph would not allow the edges to overlap or for a node to overlap an edge in this small graph because in this situation, a user would only be able to select one edge rather than the other two edges between nodes 'Second' and 'Third'. This would be very inconvenient for the user who would need to select either edge. This issue gives the false impression that the edge between the 'Second' and 'Third' nodes is a two-way or two-directional connection, which is incorrect. It also gives the false impression that node 'Third' comes before node 'Second', which is also incorrect. Ideally, I would think that in this situation in a hierarchical layout, the 'Third' node should be displayed above or below the 'Second' node with both edges from 'Second' to 'Third' and 'Third' to 'Second' visible for the user to view and select. |
Confirmed. There are two issues here:
For the second issue, I have tracked the problem to closure However, I'm not convinced yet that this solution is general enough for all hierarchical networks.. I need to test more before submitting a PR. |
…sDirected() Fix for almende#2311. Nodes with bidirectional edges got their levels shifted due to the handling of both edge directions. This fix adds a check on bidirectionality and blocks any subsequent level adjustment. Pure tree layouts are unaffected by this change.
…sDirected() (#3294) * Levels of direct hierarchical network only incremented * Cleaned up old code * Quick fix on presence globaOptions in mergeOptions() * Revert fix, doesn't work * Network: Block recalculation of level in LayoutEngine._determineLevelsDirected() Fix for #2311. Nodes with bidirectional edges got their levels shifted due to the handling of both edge directions. This fix adds a check on bidirectionality and blocks any subsequent level adjustment. Pure tree layouts are unaffected by this change.
OP here. Thank you so much for the fix!! |
I've applied the changes to a test instance and I can confirm that the real issue has not been fixed according to my original description. I will attempt to resolve this issue. Any assistance is appreciated. |
@theredcameron Thanks in advance for your effort! Please regard me as standing by for assistance. |
Sorry about the wait. I'll continue work on this soon. |
…sDirected() (almende#3294) * Levels of direct hierarchical network only incremented * Cleaned up old code * Quick fix on presence globaOptions in mergeOptions() * Revert fix, doesn't work * Network: Block recalculation of level in LayoutEngine._determineLevelsDirected() Fix for almende#2311. Nodes with bidirectional edges got their levels shifted due to the handling of both edge directions. This fix adds a check on bidirectionality and blocks any subsequent level adjustment. Pure tree layouts are unaffected by this change.
When using version 3.12.0, I do not have this problem. However, when using version 4.0.0 or higher, a node will overlap onto a circuit path and give the impression that the circuit is going to that overlapping node. See attached screenshots. This first screenshot is when hierarchical layout is set to false.
This second screenshot is what happens when the hierarchical layout is set to true.
As you can see, the second and third nodes have edges pointing to each other. But when in hierarchical mode, the third node is drawn to the left of the second node. Also, the edges pointing between the second and third nodes are overlapping each other, which in this case, means that there are three edges overlapping each other.
The latest version that does not appear to have this problem is 3.12.0. After that, the issue exists.
Here is my setup below:
Here is a JSFiddle to see it in action - LINK
The text was updated successfully, but these errors were encountered: