@@ -3065,7 +3065,6 @@ axes.drawLabels = function(gd, ax, opts) {
30653065 if ( ! ticklabeloverflow || ticklabeloverflow === 'allow' ) return ;
30663066
30673067 var hideOverflow = ticklabeloverflow . indexOf ( 'hide' ) !== - 1 ;
3068- // var pushOverflow = ticklabeloverflow.indexOf('push') !== -1;
30693068
30703069 var isX = ax . _id . charAt ( 0 ) === 'x' ;
30713070 // div positions
@@ -3095,25 +3094,18 @@ axes.drawLabels = function(gd, ax, opts) {
30953094
30963095 if ( mathjaxGroup . empty ( ) ) {
30973096 var bb = Drawing . bBox ( thisLabel . node ( ) ) ;
3098- var adjust = '' ;
3097+ var adjust = 0 ;
30993098 if ( isX ) {
3100- if ( bb . right > max ) adjust += 'right' ;
3101- else if ( bb . left < min ) adjust += 'left' ;
3099+ if ( bb . right > max ) adjust = 1 ;
3100+ else if ( bb . left < min ) adjust = 1 ;
31023101 } else {
3103- if ( bb . bottom > max ) adjust += 'top' ;
3104- else if ( bb . top + ( ax . tickangle ? 0 : d . fontSize / 4 ) < min ) adjust += 'bottom' ;
3102+ if ( bb . bottom > max ) adjust = 1 ;
3103+ else if ( bb . top + ( ax . tickangle ? 0 : d . fontSize / 4 ) < min ) adjust = 1 ;
31053104 }
31063105
31073106 var t = thisLabel . select ( 'text' ) ;
31083107 if ( adjust ) {
31093108 if ( hideOverflow ) t . style ( 'opacity' , 0 ) ; // hidden
3110- /*
3111- else if(pushOverflow) {
3112- if(adjust.indexOf('left') !== -1) t.attr('text-anchor', 'start');
3113- if(adjust.indexOf('right') !== -1) t.attr('text-anchor', 'end');
3114- // more TODO: https://github.com/plotly/plotly.js/issues/3292
3115- }
3116- */
31173109 } else {
31183110 t . style ( 'opacity' , 1 ) ; // visible
31193111
0 commit comments