Skip to content

Commit

Permalink
feat: list element marked with bold key and stroke text for value; ad…
Browse files Browse the repository at this point in the history
…ded ':' delimiter
  • Loading branch information
tsypuk committed Jul 23, 2023
1 parent 7e56730 commit 7ac91e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions multicloud_diagrams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ def add_list(self, table_id='', table_name='', fillColor='', rows=[], width="300
if 'width' in self.prev_coords[f'vertex:{table_id}:list']:
mx_geometry.set('width', self.prev_coords[f'vertex:{table_id}:list']['width'])


for index, item in enumerate(rows):
name, value = item.split(":", 1)
mx_cell = et.SubElement(self.root,
'mxCell',
id=f'vertex:{table_id}:row:{index}',
value=item,
value=f'<b>{name}</b>: {value}',
style=("text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;"
"spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];"
"portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;"),
Expand Down

0 comments on commit 7ac91e4

Please sign in to comment.