mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
fixed heatmap not loading at first
This commit is contained in:
parent
97cc440e22
commit
9d6ff9fb35
2 changed files with 13 additions and 2 deletions
|
|
@ -2014,7 +2014,7 @@ export function finish(difficultyFailed = false) {
|
|||
$("#words").empty();
|
||||
ChartController.result.resize();
|
||||
|
||||
if (Config.burstHeatmap) {
|
||||
if (Config.alwaysShowWordsHistory && Config.burstHeatmap) {
|
||||
TestUI.applyBurstHeatmap();
|
||||
}
|
||||
$("#testModesNotice").addClass("hidden");
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import * as PractiseWords from "./practise-words";
|
|||
import * as Replay from "./replay";
|
||||
import * as TestStats from "./test-stats";
|
||||
import * as Misc from "./misc";
|
||||
import * as TestUI from "./test-ui";
|
||||
|
||||
export let currentWordElementIndex = 0;
|
||||
export let resultVisible = false;
|
||||
|
|
@ -770,12 +771,22 @@ export function toggleResultWords() {
|
|||
`<div class="preloader"><i class="fas fa-fw fa-spin fa-circle-notch"></i></div>`
|
||||
);
|
||||
loadWordsHistory().then(() => {
|
||||
if (Config.burstHeatmap) {
|
||||
TestUI.applyBurstHeatmap();
|
||||
}
|
||||
$("#resultWordsHistory")
|
||||
.removeClass("hidden")
|
||||
.css("display", "none")
|
||||
.slideDown(250);
|
||||
.slideDown(250, () => {
|
||||
if (Config.burstHeatmap) {
|
||||
TestUI.applyBurstHeatmap();
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
if (Config.burstHeatmap) {
|
||||
TestUI.applyBurstHeatmap();
|
||||
}
|
||||
$("#resultWordsHistory")
|
||||
.removeClass("hidden")
|
||||
.css("display", "none")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue