From 148f78a4c8cb2882131962dcd7f53913744eddd8 Mon Sep 17 00:00:00 2001 From: Cliff Sun Date: Mon, 24 Jun 2024 10:17:04 +0100 Subject: [PATCH] Pass opts through to 'order' function Fixes a merge issue where the changes to layout.js in this PR (https://github.com/dagrejs/dagre/pull/263/files) didn't make it in for some reason. --- lib/layout.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/layout.js b/lib/layout.js index dfccf301..5846495b 100644 --- a/lib/layout.js +++ b/lib/layout.js @@ -21,12 +21,12 @@ function layout(g, opts) { time("layout", () => { let layoutGraph = time(" buildLayoutGraph", () => buildLayoutGraph(g)); - time(" runLayout", () => runLayout(layoutGraph, time)); + time(" runLayout", () => runLayout(layoutGraph, time, opts)); time(" updateInputGraph", () => updateInputGraph(g, layoutGraph)); }); } -function runLayout(g, time) { +function runLayout(g, time, opts) { time(" makeSpaceForEdgeLabels", () => makeSpaceForEdgeLabels(g)); time(" removeSelfEdges", () => removeSelfEdges(g)); time(" acyclic", () => acyclic.run(g)); @@ -41,7 +41,7 @@ function runLayout(g, time) { time(" normalize.run", () => normalize.run(g)); time(" parentDummyChains", () => parentDummyChains(g)); time(" addBorderSegments", () => addBorderSegments(g)); - time(" order", () => order(g)); + time(" order", () => order(g, opts)); time(" insertSelfEdges", () => insertSelfEdges(g)); time(" adjustCoordinateSystem", () => coordinateSystem.adjust(g)); time(" position", () => position(g));