@@ -355,15 +355,15 @@ function getTraceWidth(trace, legendObj, textGap) {
355
355
var legendItem = trace [ 0 ] ;
356
356
var legendWidth = legendItem . width ;
357
357
358
- var traceLegendWidth = legendItem . trace . legendwidth || legendObj . entrywidth
358
+ var traceLegendWidth = legendItem . trace . legendwidth || legendObj . entrywidth ;
359
359
360
- if ( traceLegendWidth ) {
361
- if ( legendObj . widthmode === "pixels" ) {
362
- return traceLegendWidth + textGap
363
- } else {
364
- return legendObj . _maxWidth * traceLegendWidth
365
- }
360
+ if ( traceLegendWidth ) {
361
+ if ( legendObj . widthmode === 'pixels' ) {
362
+ return traceLegendWidth + textGap ;
363
+ } else {
364
+ return legendObj . _maxWidth * traceLegendWidth ;
366
365
}
366
+ }
367
367
368
368
return legendWidth + textGap ;
369
369
}
@@ -772,7 +772,7 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
772
772
var w = getTraceWidth ( d , legendObj , textGap , isGrouped ) ;
773
773
var next = ( oneRowLegend ? w : maxItemWidth ) ;
774
774
775
- if ( legendObj . widthmode !== 'fraction' ) {
775
+ if ( legendObj . widthmode !== 'fraction' ) {
776
776
next += itemGap ;
777
777
}
778
778
@@ -831,7 +831,7 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
831
831
traceWidth = legendGroupWidths [ legendgroup ] ;
832
832
}
833
833
var w = isEditable ? textGap : ( toggleRectWidth || traceWidth ) ;
834
- if ( ! isVertical && legendObj . widthmode !== " fraction" ) {
834
+ if ( ! isVertical && legendObj . widthmode !== ' fraction' ) {
835
835
w += itemGap / 2 ;
836
836
}
837
837
Drawing . setRect ( traceToggle , 0 , - h / 2 , w , h ) ;
0 commit comments