Skip to content

Commit 5b1e104

Browse files
authored
Merge pull request #6889 from geopozo/bug/pikul-standoff-position
Bug/pikul standoff position
2 parents 8eb1183 + 5503c70 commit 5b1e104

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/plots/cartesian/axes.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -2453,7 +2453,7 @@ axes.drawOne = function(gd, ax, opts) {
24532453
var llbboxes = {};
24542454
function getLabelLevelBbox(suffix) {
24552455
var cls = axId + (suffix || 'tick');
2456-
if(!llbboxes[cls]) llbboxes[cls] = calcLabelLevelBbox(ax, cls);
2456+
if(!llbboxes[cls]) llbboxes[cls] = calcLabelLevelBbox(ax, cls, mainLinePositionShift);
24572457
return llbboxes[cls];
24582458
}
24592459

@@ -2873,7 +2873,7 @@ function getDividerVals(ax, vals) {
28732873
return out;
28742874
}
28752875

2876-
function calcLabelLevelBbox(ax, cls) {
2876+
function calcLabelLevelBbox(ax, cls, mainLinePositionShift) {
28772877
var top, bottom;
28782878
var left, right;
28792879

@@ -2898,10 +2898,9 @@ function calcLabelLevelBbox(ax, cls) {
28982898
right = Math.max(right, bb.right);
28992899
});
29002900
} else {
2901-
top = 0;
2902-
bottom = 0;
2903-
left = 0;
2904-
right = 0;
2901+
var dummyCalc = axes.makeLabelFns(ax, mainLinePositionShift);
2902+
top = bottom = dummyCalc.yFn({dx: 0, dy: 0, fontSize: 0}); // I don't know what dx, dy is
2903+
left = right = dummyCalc.xFn({dx: 0, dy: 0, fontSize: 0});
29052904
}
29062905

29072906
return {

0 commit comments

Comments
 (0)