mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-03 22:15:07 +08:00
fitting the graph to the wpm line if dont start graphs at zero is enabled
This commit is contained in:
parent
5de90b3f59
commit
21498e7e28
1 changed files with 6 additions and 3 deletions
|
|
@ -1866,8 +1866,12 @@ function showResult(difficultyFailed = false) {
|
|||
);
|
||||
|
||||
if (!config.startGraphsAtZero) {
|
||||
wpmOverTimeChart.options.scales.yAxes[0].ticks.min = minChartVal;
|
||||
wpmOverTimeChart.options.scales.yAxes[1].ticks.min = minChartVal;
|
||||
wpmOverTimeChart.options.scales.yAxes[0].ticks.min = Math.min(
|
||||
...wpmHistory
|
||||
);
|
||||
wpmOverTimeChart.options.scales.yAxes[1].ticks.min = Math.min(
|
||||
...wpmHistory
|
||||
);
|
||||
} else {
|
||||
wpmOverTimeChart.options.scales.yAxes[0].ticks.min = 0;
|
||||
wpmOverTimeChart.options.scales.yAxes[1].ticks.min = 0;
|
||||
|
|
@ -4268,7 +4272,6 @@ $(document).keydown((event) => {
|
|||
event.preventDefault();
|
||||
let currentWord = wordsList[currentWordIndex];
|
||||
if (!config.showAllLines || config.mode == "time") {
|
||||
|
||||
let currentTop = Math.floor(
|
||||
document.querySelectorAll("#words .word")[currentWordElementIndex]
|
||||
.offsetTop
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue