Skip to content

Commit 264617b

Browse files
committed
drawLabels: don't attempt to re-fix label if it is already rotated by 90 or -90 degrees.
Previously this check only tested 90 degrees.
1 parent 33dc2de commit 264617b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plots/cartesian/axes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3806,8 +3806,8 @@ axes.drawLabels = function(gd, ax, opts) {
38063806
// N.B. during auto-margin redraws, if the axis fixed its label overlaps
38073807
// by rotating 90 degrees, do not attempt to re-fix its label overlaps
38083808
// as this can lead to infinite redraw loops!
3809-
if(ax.automargin && fullLayout._redrawFromAutoMarginCount && prevAngle === 90) {
3810-
autoangle = 90;
3809+
if(ax.automargin && fullLayout._redrawFromAutoMarginCount && Math.abs(prevAngle) === 90) {
3810+
autoangle = prevAngle;
38113811
seq.push(function() {
38123812
positionLabels(tickLabels, prevAngle);
38133813
});

0 commit comments

Comments
 (0)