Skip to content

Commit

Permalink
Merge pull request #421 from RohitPaul0007/patch-64
Browse files Browse the repository at this point in the history
Update debug.js
  • Loading branch information
rustedgrail committed Sep 11, 2023
2 parents 23135f2 + 291a3ff commit da83461
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/debug.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
var util = require("./util");
var Graph = require("@dagrejs/graphlib").Graph;
let util = require("./util");
let Graph = require("@dagrejs/graphlib").Graph;

module.exports = {
debugOrdering: debugOrdering
};

/* istanbul ignore next */
function debugOrdering(g) {
var layerMatrix = util.buildLayerMatrix(g);
let layerMatrix = util.buildLayerMatrix(g);

var h = new Graph({ compound: true, multigraph: true }).setGraph({});
let h = new Graph({ compound: true, multigraph: true }).setGraph({});

g.nodes().forEach(v => {
h.setNode(v, { label: v });
Expand All @@ -19,7 +19,7 @@ function debugOrdering(g) {
g.edges().forEach(e => h.setEdge(e.v, e.w, {}, e.name));

layerMatrix.forEach((layer, i) => {
var layerV = "layer" + i;
let layerV = "layer" + i;
h.setNode(layerV, { rank: "same" });
layer.reduce((u, v) => {
h.setEdge(u, v, { style: "invis" });
Expand Down

0 comments on commit da83461

Please sign in to comment.