dagre layout can't fetch edges
silentmissile opened this issue · 1 comments
silentmissile commented
in layout() function in @dagrejs/dagre
Line 82 in 68f4943
inputLabel and layoutLabel are two strings
in line 86, the code assign "points" property to string, that code can't run, the error message is:
TypeError: Cannot create property 'points' on string "my-label"
rustedgrail commented
If graph.setEdge has a 3rd argument, it's used as the edgeLabel, so edge didn't always return a string and in the Dagre tests, an object was used for the label.
Regardless, I added an edgeAsObj function in Graphlib and used that in layout.js. Both libraries have been released to NPM.