Skip to content

Commit

Permalink
drawLabels: don't attempt to re-fix label if it is already rotated by…
Browse files Browse the repository at this point in the history
… 90 or -90 degrees.

Previously this check only tested 90 degrees.
  • Loading branch information
my-tien committed Nov 22, 2023
1 parent 33dc2de commit 264617b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3806,8 +3806,8 @@ axes.drawLabels = function(gd, ax, opts) {
// N.B. during auto-margin redraws, if the axis fixed its label overlaps
// by rotating 90 degrees, do not attempt to re-fix its label overlaps
// as this can lead to infinite redraw loops!
if(ax.automargin && fullLayout._redrawFromAutoMarginCount && prevAngle === 90) {
autoangle = 90;
if(ax.automargin && fullLayout._redrawFromAutoMarginCount && Math.abs(prevAngle) === 90) {
autoangle = prevAngle;
seq.push(function() {
positionLabels(tickLabels, prevAngle);
});
Expand Down

0 comments on commit 264617b

Please sign in to comment.