Skip to content

Commit e264cee

Browse files
authored
Merge pull request #155 from EQWorks/fix-legend-width
[G2M] Fix legend title container max-width for zero values
2 parents 21882ee + d92ae6f commit e264cee

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eqworks/react-maps",
3-
"version": "0.11.9",
3+
"version": "0.11.10",
44
"description": "React maps",
55
"author": "EQ Inc.",
66
"license": "UNLICENSED",

src/components/legend/legend-item.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
LEGEND_RADIUS_SIZE,
1414
LEGEND_TITLE_BOTTOM_MARGIN,
1515
LEGEND_TEXT_GAP,
16+
LEGEND_SYMBOL_WIDTH,
1617
} from '../../constants'
1718

1819

@@ -182,7 +183,7 @@ const LegendItem = ({ legendItemProps }) => {
182183
<LegendBody id='legend-body' padding={paddingLeft}>
183184
<LegendTitle
184185
id='legend-title'
185-
legendelemwidth={legendElemWidth}
186+
legendelemwidth={LEGEND_SYMBOL_WIDTH[legendSize]}
186187
marginbottom={legendTitleMarginBottom}
187188
marginleft={legendElementsLeftMargin + symbolContainerLeftMargin}
188189
>

0 commit comments

Comments
 (0)