From d07f631f103ca387ab493f4d00602a58d9482242 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Tue, 9 Jul 2019 17:34:54 +0000 Subject: [PATCH] Don't force apart nodes with the same label, even if not connected --- GraphNode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GraphNode.js b/GraphNode.js index c425d27..3959f2e 100644 --- a/GraphNode.js +++ b/GraphNode.js @@ -50,7 +50,7 @@ class GraphNode { this.addAffinity(node, d => d); // Keep one space between subgraphs - if (this.subgraph != node.subgraph) { + if (this.subgraph != node.subgraph && this.label != node.label) { this.addAffinity(node, d => d <= 2 ? -INF : 0); }