Open c-dante opened 8 years ago
Layout is already copying the graph -- why not let it be immutable?
Just export each of the layout functions: buildLayoutGraph, runLayout, and updateInputGraph.
buildLayoutGraph
runLayout
updateInputGraph
Also, you could just return the layoutGraph and let someone else merge it in if they want.
layoutGraph
https://github.com/ciena-blueplanet/dagre/blob/master/src/layout.js#L416
Layout is already copying the graph -- why not let it be immutable?
Just export each of the layout functions:
buildLayoutGraph
,runLayout
, andupdateInputGraph
.Also, you could just return the
layoutGraph
and let someone else merge it in if they want.https://github.com/ciena-blueplanet/dagre/blob/master/src/layout.js#L416