@@ -510,12 +510,12 @@ function drawColorBar(g, opts, gd) {
510
510
innerWidth = Math . max ( innerWidth , titleWidth ) ;
511
511
}
512
512
513
- var outerwidth = 2 * xpad + innerWidth + borderwidth + outlinewidth / 2 ;
513
+ var outerThickness = 2 * xpad + innerWidth + borderwidth + outlinewidth / 2 ;
514
514
515
515
g . select ( '.' + cn . cbbg ) . attr ( {
516
516
x : uPx - xpad - ( borderwidth + outlinewidth ) / 2 ,
517
517
y : vPx - lenPx - yExtraPx ,
518
- width : Math . max ( outerwidth , 2 ) ,
518
+ width : Math . max ( outerThickness , 2 ) ,
519
519
height : Math . max ( lenPx + 2 * yExtraPx , 2 )
520
520
} )
521
521
. call ( Color . fill , opts . bgcolor )
@@ -535,7 +535,7 @@ function drawColorBar(g, opts, gd) {
535
535
} ) ;
536
536
537
537
// fix positioning for xanchor!='left'
538
- var xoffset = ( { center : 0.5 , right : 1 } [ xanchor ] || 0 ) * outerwidth ;
538
+ var xoffset = ( { center : 0.5 , right : 1 } [ xanchor ] || 0 ) * outerThickness ;
539
539
g . attr ( 'transform' , strTranslate ( gs . l - xoffset , gs . t ) ) ;
540
540
541
541
// auto margin adjustment
@@ -556,10 +556,10 @@ function drawColorBar(g, opts, gd) {
556
556
var rFrac = FROM_BR [ xanchor ] ;
557
557
if ( thicknessmode === 'pixels' ) {
558
558
marginOpts . x = optsX ;
559
- marginOpts . l = outerwidth * lFrac ;
560
- marginOpts . r = outerwidth * rFrac ;
559
+ marginOpts . l = outerThickness * lFrac ;
560
+ marginOpts . r = outerThickness * rFrac ;
561
561
} else {
562
- var extraThickness = outerwidth - thickPx ;
562
+ var extraThickness = outerThickness - thickPx ;
563
563
marginOpts . l = extraThickness * lFrac ;
564
564
marginOpts . r = extraThickness * rFrac ;
565
565
marginOpts . xl = optsX - thickness * lFrac ;
0 commit comments