@@ -355,15 +355,15 @@ function getTraceWidth(trace, legendObj, textGap) {
355355 var legendItem = trace [ 0 ] ;
356356 var legendWidth = legendItem . width ;
357357
358- var traceLegendWidth = legendItem . trace . legendwidth || legendObj . entrywidth
358+ var traceLegendWidth = legendItem . trace . legendwidth || legendObj . entrywidth ;
359359
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 ;
366365 }
366+ }
367367
368368 return legendWidth + textGap ;
369369}
@@ -772,7 +772,7 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
772772 var w = getTraceWidth ( d , legendObj , textGap , isGrouped ) ;
773773 var next = ( oneRowLegend ? w : maxItemWidth ) ;
774774
775- if ( legendObj . widthmode !== 'fraction' ) {
775+ if ( legendObj . widthmode !== 'fraction' ) {
776776 next += itemGap ;
777777 }
778778
@@ -831,7 +831,7 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
831831 traceWidth = legendGroupWidths [ legendgroup ] ;
832832 }
833833 var w = isEditable ? textGap : ( toggleRectWidth || traceWidth ) ;
834- if ( ! isVertical && legendObj . widthmode !== " fraction" ) {
834+ if ( ! isVertical && legendObj . widthmode !== ' fraction' ) {
835835 w += itemGap / 2 ;
836836 }
837837 Drawing . setRect ( traceToggle , 0 , - h / 2 , w , h ) ;
0 commit comments