Closed sakopqiu closed 5 years ago
That's a problem with dagre. This extension just lets you use dagre with cytoscape.
You should use the dagre issue tracker and post your problem in the issue you linked to: https://github.com/dagrejs/dagre/issues/234#issuecomment-399488074
Problem description
Hi there, I have come across the same issue as described in https://github.com/dagrejs/dagre/issues/234#issuecomment-399488074. Fortunately, I was able to sketch out a simple html page to reproduce the bug. The data part below is quite big since I can not reproduce the bug with only a small amount of data. Precisely speaking, I dont know which part of the data triggers the error.
Context
I am using cytoscape, so this snippet contains code of cytoscape, cytoscape.dagre as well as dagre. Three kinds of entities are drawn on the canvas, which are normal nodes, compound nodes(which are the parents of the normal node, in cytoscape's jargon) and also edges.
The interesting thing is that if I opt out of using "dagre" layout and choose to use "breadfirst", "grid" provided by cytoscape, everything renders fine. Also, If I remove "edges" from the elements to be drawn, no error occurs.
Please check my code snippet below since it is runnable if you throw it into any browser.
code