Skip to content

Commit e7a286f

Browse files
committed
need both margins for proper wrapping
1 parent d0934f3 commit e7a286f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/components/legend/draw.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ function computeLegendDimensions(gd, groups, traces) {
578578
traceWidth = 40 + legendItem.width,
579579
traceGap = opts.tracegroupgap || 5;
580580

581-
if((borderwidth + offsetX + traceGap + traceWidth) > fullLayout.width - fullLayout.margin.r) {
581+
if((borderwidth + offsetX + traceGap + traceWidth) > (fullLayout.width - (fullLayout.margin.r + fullLayout.margin.l))) {
582582
offsetX = 0;
583583
rowHeight = rowHeight + maxTraceHeight;
584584
opts.height = opts.height + maxTraceHeight;

0 commit comments

Comments
 (0)