Skip to content

Commit

Permalink
feat: actors are rendered on dedicated layer
Browse files Browse the repository at this point in the history
  • Loading branch information
tsypuk committed Jan 19, 2024
1 parent e11a5ce commit b162a0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion multicloud_diagrams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ def read_uml_from_file(self, file_name, edge_style=None, label_style=None):
# create Layer with UML file name
base_name = os.path.splitext(os.path.basename(file_name))[0]
self.add_layer(base_name)
self.add_layer('actors')
self.extract_messages_from_uml(sequence_diagram, actors=actors, participants=participants, layer_name=base_name, edge_style=edge_style, label_style=label_style)

def add_note_to_existing_edge(self, current_note, prev_edge, prefix=None):
Expand Down Expand Up @@ -720,7 +721,7 @@ def extract_messages_from_uml(self, sequence_diagram, actors, participants, laye
print('No such node')
if entity == 'actor':
node_id = generate_hash(data[0])
self.add_vertex(node_id=node_id, node_name=data[0], node_type='actor', layer_name=layer_name, hide_id=True)
self.add_vertex(node_id=node_id, node_name=data[0], node_type='actor', layer_name='actors', hide_id=True)

prev_edge = self.add_link_uml(
f'actor:{node_id}',
Expand Down

0 comments on commit b162a0d

Please sign in to comment.