mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-22 08:16:20 +08:00
fixed cpm issues. closes #1990
This commit is contained in:
parent
bb490fca9d
commit
83a5cb4639
|
@ -1748,7 +1748,9 @@ export async function finish(difficultyFailed = false) {
|
|||
}
|
||||
}
|
||||
let themecolors = await ThemeColors.get();
|
||||
let chartlpb = Config.alwaysShowCPM ? lpb * 5 : lpb;
|
||||
let chartlpb = Misc.roundTo2(
|
||||
Config.alwaysShowCPM ? lpb * 5 : lpb
|
||||
).toFixed(2);
|
||||
if (lpb > 0) {
|
||||
ChartController.result.options.annotation.annotations.push({
|
||||
enabled: false,
|
||||
|
@ -1854,9 +1856,9 @@ export async function finish(difficultyFailed = false) {
|
|||
position: annotationSide,
|
||||
xAdjust: labelAdjust,
|
||||
enabled: true,
|
||||
content: `${tag.name} PB: ${
|
||||
content: `${tag.name} PB: ${Misc.roundTo2(
|
||||
Config.alwaysShowCPM ? tpb * 5 : tpb
|
||||
}`,
|
||||
).toFixed(2)}`,
|
||||
},
|
||||
});
|
||||
if (annotationSide === "left") {
|
||||
|
|
|
@ -974,7 +974,9 @@ $(document).on("mouseenter", "#resultWordsHistory .words .word", (e) => {
|
|||
.replace(/>/g, ">")}
|
||||
</div>
|
||||
<div class="speed">
|
||||
${burst}wpm
|
||||
${Math.round(Config.alwaysShowCPM ? burst * 5 : burst)}${
|
||||
Config.alwaysShowCPM ? "cpm" : "wpm"
|
||||
}
|
||||
</div>
|
||||
</div>`
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue