Skip to content

Commit e01dc32

Browse files
committed
correct linewidth effect
1 parent 21b59e4 commit e01dc32

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/plots/cartesian/axes.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,20 +2522,20 @@ function getTickLabelUV(ax) {
25222522
var side = ax.side;
25232523

25242524
var u = isAligned ? (ax.tickwidth || 0) / 2 : 0;
2525-
var v = (ax.linewidth || 0) / 2 + TEXTPAD;
2525+
var v = TEXTPAD;
25262526

25272527
var fontSize = ax.tickfont ? ax.tickfont.size : 12;
25282528
if(isBottom || isTop) {
25292529
u += fontSize * CAP_SHIFT;
2530+
v += (ax.linewidth || 0) / 2;
25302531
}
25312532
if(isLeft || isRight) {
2532-
u += TEXTPAD;
2533+
u += (ax.linewidth || 0) / 2;
2534+
v += TEXTPAD;
25332535
}
2534-
if(isInside) {
2535-
if(side === 'top') {
2536-
v -= fontSize * MID_SHIFT;
2537-
v += TEXTPAD;
2538-
}
2536+
if(isInside && side === 'top') {
2537+
v -= fontSize * MID_SHIFT;
2538+
v += TEXTPAD;
25392539
}
25402540

25412541
if(isLeft || isTop) u = -u;
18 Bytes
Loading
-43 Bytes
Loading
445 Bytes
Loading
-769 Bytes
Loading
-120 Bytes
Loading

0 commit comments

Comments
 (0)