Commit 27883ac9 authored by David Schnur's avatar David Schnur

Merge pull request #1290 from dnschnur/axis-labels-fix

Revert #1200; it was causing #1283 breakages.
parents 2a3e3cd4 0beb104e
......@@ -1550,17 +1550,12 @@ Licensed under the MIT license.
// jump as much around with replots
$.each(allAxes(), function (_, axis) {
if (axis.reserveSpace && axis.ticks && axis.ticks.length) {
var lastTick = axis.ticks[axis.ticks.length - 1];
if (axis.direction === "x") {
margins.left = Math.max(margins.left, axis.labelWidth / 2);
if (lastTick.v <= axis.max) {
margins.right = Math.max(margins.right, axis.labelWidth / 2);
}
margins.right = Math.max(margins.right, axis.labelWidth / 2);
} else {
margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);
if (lastTick.v <= axis.max) {
margins.top = Math.max(margins.top, axis.labelHeight / 2);
}
margins.top = Math.max(margins.top, axis.labelHeight / 2);
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment