Closed jvilk closed 5 years ago
Your bezier (loop) edges are not sufficiently far away from the lhs of the node, given the w:h ratio, to allow for intersection calculations to find a proper solution.
See http://js.cytoscape.org/#style/bezier-edges
You need to adjust the distance (or step size) appropriately for your stylesheet, e.g. https://codepen.io/anon/pen/ypRmjb
Aside: unpkg (https://unpkg.com/#/) works as a cdn for all npm packages
If you try successively smaller distances in your demo, you will see roughly the point at which intersections fail.
Excellent; thanks for your help! That solution works for me.
If it's possible / easy to do, maybe you could emit a warning when this happens? When I noticed some edges were missing, I spent some time thinking my application had a bug that produced invalid graphs. It took a bit longer to realize they weren't being rendered at all!
Other than that, feel free to close this bug. Thanks for the excellent library.
There might be some automatic mitigation that could be added as a new feature, but I'd have to investigate. It probably won't give as good results as manually specifying a good value, so either way there should be a docs addition.
Adding to Future milestone, in case an automatic mitigation can be found to show the edge with an adjusted control point. For 3.3, we'll just use a console warning: #2093
I believe this bug is in cytoscape.js, but it could also be an issue with cytoscape-dagre.
Issue type:
Bug report
Environment info
Current (buggy) behaviour
See codepen here: https://codepen.io/jvilk/pen/aERMMW
There is a self-edge from n1 to n1, but it is not being rendered. n1 has the label "Node2345678". If the label is changed to be one character smaller, e.g. "Node234567", the edge appears.
Desired behaviour
The self-edge should be rendered.
Minimum steps to reproduce
See Codepen: https://codepen.io/jvilk/pen/aERMMW
Here's the relevant code from the codepen:
Is this a bug in Cytoscape, or Cytoscape-dagre? Perhaps Cytoscape-dagre is providing Cytoscape w/ invalid edge coordinates (that do not take node size into consideration), and Cytoscape is culling the edge before rendering?