Skip to content

Commit

Permalink
[docs] HTML Legend sample: add flex-shrink: 0 to color box (#11330)
Browse files Browse the repository at this point in the history
This way the color box is prevented from shrinking in case of larger legends.
  • Loading branch information
Frenzie authored Jun 7, 2023
1 parent 0cbc292 commit 6348f9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/samples/legend/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const htmlLegendPlugin = {
boxSpan.style.borderColor = item.strokeStyle;
boxSpan.style.borderWidth = item.lineWidth + 'px';
boxSpan.style.display = 'inline-block';
boxSpan.style.flexShrink = 0;
boxSpan.style.height = '20px';
boxSpan.style.marginRight = '10px';
boxSpan.style.width = '20px';
Expand Down

0 comments on commit 6348f9c

Please sign in to comment.