Skip to content

Commit 561a4c2

Browse files
committed
fix issue 6089 - max group height in row
1 parent bdc276e commit 561a4c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/legend/draw.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,6 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
714714
offsetY += h;
715715
maxWidthInGroup = Math.max(maxWidthInGroup, textGap + w);
716716
});
717-
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
718717

719718
var next = maxWidthInGroup + itemGap;
720719

@@ -730,6 +729,8 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
730729
groupOffsetX = 0;
731730
groupOffsetY += maxGroupHeightInRow + traceGroupGap;
732731
maxGroupHeightInRow = offsetY;
732+
} else {
733+
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
733734
}
734735

735736
Drawing.setTranslate(this, groupOffsetX, groupOffsetY);

0 commit comments

Comments
 (0)