@@ -3065,7 +3065,6 @@ axes.drawLabels = function(gd, ax, opts) {
3065
3065
if ( ! ticklabeloverflow || ticklabeloverflow === 'allow' ) return ;
3066
3066
3067
3067
var hideOverflow = ticklabeloverflow . indexOf ( 'hide' ) !== - 1 ;
3068
- // var pushOverflow = ticklabeloverflow.indexOf('push') !== -1;
3069
3068
3070
3069
var isX = ax . _id . charAt ( 0 ) === 'x' ;
3071
3070
// div positions
@@ -3095,25 +3094,18 @@ axes.drawLabels = function(gd, ax, opts) {
3095
3094
3096
3095
if ( mathjaxGroup . empty ( ) ) {
3097
3096
var bb = Drawing . bBox ( thisLabel . node ( ) ) ;
3098
- var adjust = '' ;
3097
+ var adjust = 0 ;
3099
3098
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 ;
3102
3101
} 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 ;
3105
3104
}
3106
3105
3107
3106
var t = thisLabel . select ( 'text' ) ;
3108
3107
if ( adjust ) {
3109
3108
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
- */
3117
3109
} else {
3118
3110
t . style ( 'opacity' , 1 ) ; // visible
3119
3111
0 commit comments