Skip to content

Commit

Permalink
radial: Correct recursive remvoe overlap.
Browse files Browse the repository at this point in the history
  • Loading branch information
soerendomroes committed Sep 21, 2023
1 parent c2c49e4 commit 7e0e1a7
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,17 @@ public void extend(final ElkNode graph, final List<ElkNode> nodes, IElkProgressM
Set<ElkNode> nextLevelNodes = RadialUtil.getNextLevelNodeSet(nodes);
// Calculate the moved distance which is the amount all children and grandchildren have to be moved.
int index = 1;
while (!nextLevelNodes.isEmpty()) {
if (!nextLevelNodes.isEmpty()) {
for(ElkNode nextLevelNode : nextLevelNodes) {
moveNode(nextLevelNode, movedDistance);
}
progressMonitor.logGraph(graph, "Child movement " + index);
nextLevelNodes = RadialUtil.getNextLevelNodeSet(new ArrayList<>(nextLevelNodes));
index++;
}

if (sorter != null) {
sorter.sort(new ArrayList<>(nextLevelNodes));
}
progressMonitor.logGraph(graph, "After ancestor movement");
extend(graph, new ArrayList<>(nextLevelNodes), progressMonitor);
}
}
Expand Down

0 comments on commit 7e0e1a7

Please sign in to comment.