Fix width of team badges svg

Use the max width of all rows to determine
width of the svg generated, rather than taking
the last element's width; this will work regardless
of whether there are 4 badges in the last row.

Change-Id: Ibc427bca0acdab119c0c2b358bba04eec7418327
This commit is contained in:
Goutham Pacha Ravi 2018-06-20 18:26:10 -07:00
parent a9a5a38244
commit c04056f106
1 changed files with 2 additions and 1 deletions

View File

@ -185,7 +185,8 @@ def _generate_teams_badges(app, exception=None):
badges = _organize_badges(_generate_tag_badges(tags))
svg = '\n'.join(_to_svg(chain(*badges)))
root_width = badges[-1][-1]['svg_x'] + badges[-1][-1]['width']
root_width = max([bdg_row[-1]['width'] + bdg_row[-1]['svg_x']
for bdg_row in badges])
root_height = badges[-1][0]['svg_y'] + badges[-1][0]['height']
for repo in deliverable.get('repos', []):