@@ -2972,13 +2972,11 @@ function calcLabelLevelBbox(ax, cls, mainLinePositionShift) {
29722972 // (like in fixLabelOverlaps) instead and use Axes.getPxPosition
29732973 // together with the makeLabelFns outputs and `tickangle`
29742974 // 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 ) ;
29822980 } ) ;
29832981 } else {
29842982 var dummyCalc = axes . makeLabelFns ( ax , mainLinePositionShift ) ;
@@ -3671,7 +3669,7 @@ axes.drawLabels = function(gd, ax, opts) {
36713669 'text-anchor' : anchor
36723670 } ) ;
36733671
3674- thisText . style ( 'display ' , null ) ; // visible
3672+ thisText . style ( 'opacity ' , 1 ) ; // visible
36753673
36763674 if ( ax . _adjustTickLabelsOverflow ) {
36773675 ax . _adjustTickLabelsOverflow ( ) ;
@@ -3729,9 +3727,9 @@ axes.drawLabels = function(gd, ax, opts) {
37293727
37303728 var t = thisLabel . select ( 'text' ) ;
37313729 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
37353733
37363734 if ( side === 'bottom' || side === 'right' ) {
37373735 visibleLabelMin = Math . min ( visibleLabelMin , isX ? bb . top : bb . left ) ;
@@ -3808,7 +3806,7 @@ axes.drawLabels = function(gd, ax, opts) {
38083806 q > ax [ '_visibleLabelMin_' + anchorAx . _id ]
38093807 ) {
38103808 t . style ( 'display' , 'none' ) ; // hidden
3811- } else if ( e . K === 'tick' && ! idx && t . node ( ) . style . display !== 'none' ) {
3809+ } else if ( e . K === 'tick' && ! idx ) {
38123810 t . style ( 'display' , null ) ; // visible
38133811 }
38143812 } ) ;
0 commit comments