Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2452,7 +2452,7 @@ axes.drawOne = function(gd, ax, opts) {
var llbboxes = {};
function getLabelLevelBbox(suffix) {
var cls = axId + (suffix || 'tick');
if(!llbboxes[cls]) llbboxes[cls] = calcLabelLevelBbox(ax, cls);
if(!llbboxes[cls]) llbboxes[cls] = calcLabelLevelBbox(ax, cls, mainLinePositionShift);
return llbboxes[cls];
}

Expand Down Expand Up @@ -2872,7 +2872,7 @@ function getDividerVals(ax, vals) {
return out;
}

function calcLabelLevelBbox(ax, cls) {
function calcLabelLevelBbox(ax, cls, mainLinePositionShift) {
var top, bottom;
var left, right;

Expand All @@ -2897,10 +2897,9 @@ function calcLabelLevelBbox(ax, cls) {
right = Math.max(right, bb.right);
});
} else {
top = 0;
bottom = 0;
left = 0;
right = 0;
var dummyCalc = axes.makeLabelFns(ax, mainLinePositionShift);
top = bottom = dummyCalc.yFn({dx: 0, dy: 0, fontSize: 0}); // I don't know what dx, dy is
left = right = dummyCalc.xFn({dx: 0, dy: 0, fontSize: 0});
}

return {
Expand Down