@@ -2972,13 +2972,11 @@ function calcLabelLevelBbox(ax, cls, mainLinePositionShift) {
2972
2972
// (like in fixLabelOverlaps) instead and use Axes.getPxPosition
2973
2973
// together with the makeLabelFns outputs and `tickangle`
2974
2974
// to compute one bbox per (tick value x tick style)
2975
- if ( thisLabel . node ( ) . style . display !== 'none' ) {
2976
- var bb = Drawing . bBox ( thisLabel . node ( ) . parentNode ) ;
2977
- top = Math . min ( top , bb . top ) ;
2978
- bottom = Math . max ( bottom , bb . bottom ) ;
2979
- left = Math . min ( left , bb . left ) ;
2980
- right = Math . max ( right , bb . right ) ;
2981
- }
2975
+ var bb = Drawing . bBox ( thisLabel . node ( ) . parentNode ) ;
2976
+ top = Math . min ( top , bb . top ) ;
2977
+ bottom = Math . max ( bottom , bb . bottom ) ;
2978
+ left = Math . min ( left , bb . left ) ;
2979
+ right = Math . max ( right , bb . right ) ;
2982
2980
} ) ;
2983
2981
} else {
2984
2982
var dummyCalc = axes . makeLabelFns ( ax , mainLinePositionShift ) ;
@@ -3671,7 +3669,7 @@ axes.drawLabels = function(gd, ax, opts) {
3671
3669
'text-anchor' : anchor
3672
3670
} ) ;
3673
3671
3674
- thisText . style ( 'display ' , null ) ; // visible
3672
+ thisText . style ( 'opacity ' , 1 ) ; // visible
3675
3673
3676
3674
if ( ax . _adjustTickLabelsOverflow ) {
3677
3675
ax . _adjustTickLabelsOverflow ( ) ;
@@ -3729,9 +3727,9 @@ axes.drawLabels = function(gd, ax, opts) {
3729
3727
3730
3728
var t = thisLabel . select ( 'text' ) ;
3731
3729
if ( adjust ) {
3732
- if ( hideOverflow ) t . style ( 'display ' , 'none' ) ; // hidden
3733
- } else if ( t . node ( ) . style . display !== 'none' ) {
3734
- t . style ( 'display ' , null ) ;
3730
+ if ( hideOverflow ) t . style ( 'opacity ' , 0 ) ; // hidden
3731
+ } else {
3732
+ t . style ( 'opacity ' , 1 ) ; // visible
3735
3733
3736
3734
if ( side === 'bottom' || side === 'right' ) {
3737
3735
visibleLabelMin = Math . min ( visibleLabelMin , isX ? bb . top : bb . left ) ;
@@ -3808,7 +3806,7 @@ axes.drawLabels = function(gd, ax, opts) {
3808
3806
q > ax [ '_visibleLabelMin_' + anchorAx . _id ]
3809
3807
) {
3810
3808
t . style ( 'display' , 'none' ) ; // hidden
3811
- } else if ( e . K === 'tick' && ! idx && t . node ( ) . style . display !== 'none' ) {
3809
+ } else if ( e . K === 'tick' && ! idx ) {
3812
3810
t . style ( 'display' , null ) ; // visible
3813
3811
}
3814
3812
} ) ;
0 commit comments