Skip to content

Commit

Permalink
Merge 221b42c into d0f4410
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanKrall committed Apr 5, 2019
2 parents d0f4410 + 221b42c commit 8ebcec0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions transitions/extensions/diagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ def _add_edges(self, events, container):
src = transitions[0]
edge_attr = {}
for trans in transitions[1]:
full_label = label
if trans.dest is None:
dst = src
label += " [internal]"
full_label = label + " [internal]"
else:
dst = trans.dest
edge_attr['label'] = self._transition_label(label, trans)
edge_attr['label'] = self._transition_label(full_label, trans)
if container.has_edge(src, dst):
edge = container.get_edge(src, dst)
edge.attr['label'] = edge.attr['label'] + ' | ' + edge_attr['label']
Expand Down Expand Up @@ -244,9 +245,10 @@ def _add_edges(self, events, container):
for trans in transitions[1]:
if trans in self.seen_transitions:
continue
full_label = label
if trans.dest is None:
dst = src
label += " [internal]"
full_label = label + " [internal]"
elif not container.has_node(trans.dest) and _get_subgraph(container, 'cluster_' + trans.dest) is None:
continue
else:
Expand All @@ -264,7 +266,7 @@ def _add_edges(self, events, container):
if _get_subgraph(container, edge_attr['ltail']).has_node(dst_name):
del edge_attr['ltail']

edge_attr[label_pos] = self._transition_label(label, trans)
edge_attr[label_pos] = self._transition_label(full_label, trans)
if container.has_edge(src_name, dst_name):
edge = container.get_edge(src_name, dst_name)
edge.attr[label_pos] += ' | ' + edge_attr[label_pos]
Expand Down

0 comments on commit 8ebcec0

Please sign in to comment.