[docs] HTML Legend sample: add flex-shrink: 0 to color box (#11330)

This way the color box is prevented from shrinking in case of larger legends.
This commit is contained in:
Frans de Jonge
2023-06-07 18:44:21 +02:00
committed by GitHub
parent 0cbc292dc7
commit 6348f9ce9f

View File

@@ -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';