Skip to content

Commit 76df791

Browse files
committed
Fix traceGroup vriable and baseline images
1 parent 51178ec commit 76df791

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/components/legend/draw.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ function computeLegendDimensions(gd, groups, traces) {
553553

554554
var extraWidth = 0;
555555

556+
var traceGap = 5;
557+
556558
opts._width = 0;
557559
opts._height = 0;
558560

@@ -610,14 +612,13 @@ function computeLegendDimensions(gd, groups, traces) {
610612
});
611613

612614
maxHeight += opts.tracegroupgap;
613-
var traceGroupGap = 5;
614-
maxWidth += traceGroupGap;
615+
maxWidth += traceGap;
615616

616617
var groupXOffsets = [opts._width];
617618
var rowHeights = [];
618619
var rowNum = 1;
619620
for(var i = 0, n = groupData.length; i < n; i++) {
620-
opts._width += maxWidth ;
621+
opts._width += maxWidth;
621622

622623
if(fullLayout._size.w < (borderwidth + opts._width + maxWidth)) {
623624
groupXOffsets[groupXOffsets.length - 1] = groupXOffsets[0];
@@ -671,7 +672,6 @@ function computeLegendDimensions(gd, groups, traces) {
671672
var maxTraceWidth = 0;
672673
var offsetX = 0;
673674
var fullTracesWidth = 0;
674-
var traceGap = 5;
675675

676676
// calculate largest width for traces and use for width of all legend items
677677
traces.each(function(d) {
35 Bytes
Loading
1.17 KB
Loading

0 commit comments

Comments
 (0)