- Made cp-data a runtime dependency. It was incorrectly specified as a dev
dependency, which could case result in the error
cannot find module cp-data
.
- Added support for rank constraints.
Backwards incompatible changes:
- Dagre now takes a
dagre.Digraph
ordagre.Graph
as input for layout. See README.md for details. util
is no longer exported from dagre.
Backwards compatible changes:
- Dagre can now perform layout for undirected graphs (dagre.Graph).
This release removes the export of Graph
from the graphlib
library. If you
use Graph
, please get it directly from graphlib
.
With this release you can use node ids instead of references in edges. Where you used to do this:
var nodes = [
{width: w1, height: h1},
{width: w2, height: h2}
];
var edges = [
{ source: nodes[0], target: nodes[1] }
];
dagre.layout()
.nodes(nodes)
.edges(edges)
.run();
You can instead do this:
var nodes = [
{id: "n1", width: w1, height: h1},
{id: "n2", width: w2, height: h2}
];
var edges = [
{ sourceId: "n1", targetId: "n2" }
];
dagre.layout()
.nodes(nodes)
.edges(edges)
.run();
Use whichever is more convenient for your needs.
- Initial CHANGELOG entry