Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function initLayoutGraph(inputGraph) {
var g = new CDigraph();
inputGraph.eachNode(function(u, value) {
if (value === undefined) value = {};
g.addNode(u, {
width: value.width,
height: value.height
});
if (value.hasOwnProperty('rank')) {
g.node(u).prefRank = value.rank;
}
});
// Set up subgraphs
if (inputGraph.parent) {
inputGraph.nodes().forEach(function(u) {
g.parent(u, inputGraph.parent(u));
function initLayoutGraph(inputGraph) {
var g = new CDigraph();
inputGraph.eachNode(function(u, value) {
if (value === undefined) value = {};
g.addNode(u, {
width: value.width,
height: value.height
});
if (value.hasOwnProperty("rank")) {
g.node(u).prefRank = value.rank;
}
});
// Set up subgraphs
if (inputGraph.parent) {
inputGraph.nodes().forEach(function(u) {
g.parent(u, inputGraph.parent(u));
function initLayoutGraph(inputGraph) {
var g = new CDigraph();
inputGraph.eachNode(function(u, value) {
if (value === undefined) value = {};
g.addNode(u, {
width: value.width,
height: value.height
});
if (value.hasOwnProperty('rank')) {
g.node(u).prefRank = value.rank;
}
});
// Set up subgraphs
if (inputGraph.parent) {
inputGraph.nodes().forEach(function(u) {
g.parent(u, inputGraph.parent(u));
function initLayoutGraph(inputGraph) {
var g = new CDigraph();
inputGraph.eachNode(function(u, value) {
if (value === undefined) value = {};
g.addNode(u, {
width: value.width,
height: value.height
});
if (value.hasOwnProperty('rank')) {
g.node(u).prefRank = value.rank;
}
});
// Set up subgraphs
if (inputGraph.parent) {
inputGraph.nodes().forEach(function(u) {
g.parent(u, inputGraph.parent(u));