As discussed way way way back in cytoscape/cytoscape.js#1451.
It looks like reducing the quality of Graphviz layouts using nslimit / nslimit1 (in order to make layout go faster for tangled graphs) can increase the amount of edges with wacky control points, and thus increase the amount of edges Cytoscape.js rejects for being "invalid." (Case study: setting both of the nslimit parameters to 0.5 on aug1 cc1.) With default settings (nonrecursive dot layout, and default nslimits) this doesn't seem like a problem, but it is good to make this robust.
The following code (cobbled together from cy.js's docs) seems to work to detect and fix these edges after rendering:
cy.edges().forEach(function(e){
if (e._private.rscratch.badLine) {
e.removeClass("withctrlpts");
}
});
Presumably this can just be run as a simple client-side callback immediately after drawing.
This will not be a panacea - moving nodes, or selecting things and causing borders / thicknesses to change (#276), can still cause edges to become invisible. We could ostensibly rerun this callback after each selection operation but that might be overkill and/or too slow for large graphs.
As discussed way way way back in cytoscape/cytoscape.js#1451.
It looks like reducing the quality of Graphviz layouts using
nslimit/nslimit1(in order to make layout go faster for tangled graphs) can increase the amount of edges with wacky control points, and thus increase the amount of edges Cytoscape.js rejects for being "invalid." (Case study: setting both of thenslimitparameters to0.5on aug1 cc1.) With default settings (nonrecursive dot layout, and defaultnslimits) this doesn't seem like a problem, but it is good to make this robust.The following code (cobbled together from cy.js's docs) seems to work to detect and fix these edges after rendering:
Presumably this can just be run as a simple client-side callback immediately after drawing.
This will not be a panacea - moving nodes, or selecting things and causing borders / thicknesses to change (#276), can still cause edges to become invisible. We could ostensibly rerun this callback after each selection operation but that might be overkill and/or too slow for large graphs.