File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -2974,8 +2974,6 @@ axes.makeTransTickLabelFn = function(ax) {
29742974 var u = uv [ 0 ] ;
29752975 var v = uv [ 1 ] ;
29762976
2977- var isXaxis = ax . _id . charAt ( 0 ) === 'x' ;
2978- var isYaxis = ! isXaxis ;
29792977 var isReversed = ax . range [ 0 ] > ax . range [ 1 ] ;
29802978 var labelsInside = ax . ticklabelposition && ax . ticklabelposition . indexOf ( 'inside' ) !== - 1 ;
29812979 var labelsOutside = ! labelsInside ;
@@ -2985,14 +2983,14 @@ axes.makeTransTickLabelFn = function(ax) {
29852983 shift = shift * shiftSign ;
29862984 }
29872985 if ( standoff ) {
2988- var standoffSign =
2989- isXaxis && ax . side === 'bottom' && labelsOutside ||
2990- isXaxis && ax . side === 'top' && labelsInside ||
2991- isYaxis && ax . side === 'right' && labelsOutside ||
2992- isYaxis && ax . side === 'left' && labelsInside ? 1 : - 1 ;
2986+ var side = ax . side ;
2987+ var standoffSign = (
2988+ ( labelsInside && ( side === 'top' || side === 'left' ) ) ||
2989+ ( labelsOutside && ( side === 'bottom' || side === 'right' ) )
2990+ ) ? 1 : - 1 ;
29932991 standoff = standoff * standoffSign ;
29942992 }
2995- return isXaxis ?
2993+ return ax . _id . charAt ( 0 ) === 'x' ?
29962994 function ( d ) {
29972995 return strTranslate (
29982996 u + ax . _offset + ax . l2p ( getPosX ( d ) ) + shift ,
You can’t perform that action at this time.
0 commit comments