Skip to content

Commit

Permalink
fix include_unlinked_nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
FloSch62 committed Apr 17, 2024
1 parent bc2275d commit d5ce7bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clab2drawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,10 @@ def main(input_file, output_file, grafana, theme, include_unlinked_nodes=False,

if not include_unlinked_nodes:
connected_nodes = {name: node for name, node in nodes.items() if node.links}
diagram.nodes = connected_nodes
nodes = diagram.nodes
diagram.nodes = connected_nodes
nodes = diagram.nodes
else:
diagram.nodes = nodes

assign_graphlevels(diagram, verbose=False)
calculate_positions(diagram, layout=layout, verbose=verbose)
Expand Down

0 comments on commit d5ce7bc

Please sign in to comment.