Skip to content

Commit

Permalink
merge: Support small labels in SVG (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuestengecko committed Nov 27, 2024
2 parents 59602d3 + ea4b85e commit d220475
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capellambse/svg/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def check_for_horizontal_overflow(
alignment: AlignmentLiteral = "center",
) -> tuple[cabc.Sequence[str], float, float]:
max_text_width = width - icon_size - icon_padding
assert max_text_width >= 0
max_text_width = max(max_text_width, 0)
lines = helpers.word_wrap(text, max_text_width)
text_width = max(w for w, _ in map(helpers.extent_func, lines))
label_width = text_width + icon_size + icon_padding
Expand Down

0 comments on commit d220475

Please sign in to comment.