mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 05:17:51 +08:00
spacing tag labels away from the edge
This commit is contained in:
parent
6aaeaf4417
commit
763899a7b9
1 changed files with 4 additions and 0 deletions
|
@ -1625,6 +1625,7 @@ export async function finish(difficultyFailed = false) {
|
|||
}
|
||||
$("#result .stats .tags .bottom").text("");
|
||||
let annotationSide = "left";
|
||||
let labelAdjust = 15;
|
||||
activeTags.forEach(async (tag) => {
|
||||
let tpb = await DB.getLocalTagPB(
|
||||
tag.id,
|
||||
|
@ -1680,14 +1681,17 @@ export async function finish(difficultyFailed = false) {
|
|||
yPadding: 6,
|
||||
cornerRadius: 3,
|
||||
position: annotationSide,
|
||||
xAdjust: labelAdjust,
|
||||
enabled: true,
|
||||
content: `${tag.name} PB: ${tpb}`,
|
||||
},
|
||||
});
|
||||
if (annotationSide === "left") {
|
||||
annotationSide = "right";
|
||||
labelAdjust = -15;
|
||||
} else {
|
||||
annotationSide = "left";
|
||||
labelAdjust = 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue