Skip to content

Commit adaea01

Browse files
committed
use adjust so that the function could be reused by push options later
1 parent e478e0d commit adaea01

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/plots/cartesian/axes.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3085,17 +3085,17 @@ axes.drawLabels = function(gd, ax, opts) {
30853085

30863086
if(mathjaxGroup.empty()) {
30873087
var bb = Drawing.bBox(thisLabel.node());
3088-
var hide = false;
3088+
var adjust = false;
30893089
if(isX) {
3090-
if(bb.right > max) hide = true;
3091-
else if(bb.left < min) hide = true;
3090+
if(bb.right > max) adjust = true;
3091+
else if(bb.left < min) adjust = true;
30923092
} else {
3093-
if(bb.bottom > max) hide = true;
3094-
else if(bb.top + (ax.tickangle ? 0 : d.fontSize / 4) < min) hide = true;
3093+
if(bb.bottom > max) adjust = true;
3094+
else if(bb.top + (ax.tickangle ? 0 : d.fontSize / 4) < min) adjust = true;
30953095
}
30963096

30973097
var t = thisLabel.select('text');
3098-
if(hide) {
3098+
if(adjust) {
30993099
t.style('opacity', 0); // hidden
31003100
} else {
31013101
t.style('opacity', 1); // visible

0 commit comments

Comments
 (0)