@@ -651,21 +651,22 @@ function drawColorBar(g, opts, gd) {
651
651
ypad
652
652
) * 2 + innerThickness + borderwidth + outlinewidth / 2 ;
653
653
654
- var gapTitleHColorbar = 0 ;
654
+ var hColorbarMoveTitle = 0 ;
655
655
if ( ! isVertical && title . text && optsY <= 0 ) {
656
- gapTitleHColorbar = outerThickness / 2 ;
656
+ hColorbarMoveTitle = outerThickness / 2 ;
657
657
658
- outerThickness += gapTitleHColorbar ;
659
- moveY += gapTitleHColorbar ;
658
+ outerThickness += hColorbarMoveTitle ;
659
+ moveY += hColorbarMoveTitle ;
660
660
}
661
- gd . _fullLayout . _gapTitleHColorbar = gapTitleHColorbar ;
661
+ fullLayout . _hColorbarMoveTitle = hColorbarMoveTitle ;
662
+ fullLayout . _hColorbarMoveCBTitle = moveY ;
662
663
663
664
var extraW = borderwidth + outlinewidth ;
664
665
665
666
g . select ( '.' + cn . cbbg )
666
667
. attr ( 'x' , ( isVertical ? uPx : vPx ) - extraW / 2 - ( isVertical ? xpad : 0 ) )
667
- . attr ( 'y' , ( isVertical ? vPx : uPx ) - ( isVertical ? lenPx : ypad + moveY - gapTitleHColorbar ) )
668
- . attr ( isVertical ? 'width' : 'height' , Math . max ( outerThickness - gapTitleHColorbar , 2 ) )
668
+ . attr ( 'y' , ( isVertical ? vPx : uPx ) - ( isVertical ? lenPx : ypad + moveY - hColorbarMoveTitle ) )
669
+ . attr ( isVertical ? 'width' : 'height' , Math . max ( outerThickness - hColorbarMoveTitle , 2 ) )
669
670
. attr ( isVertical ? 'height' : 'width' , Math . max ( lenPx + extraW , 2 ) )
670
671
. call ( Color . fill , opts . bgcolor )
671
672
. call ( Color . stroke , opts . bordercolor )
0 commit comments