Hide messages on updatechunk and removechunk

This commit is contained in:
Gnome Ann 2021-08-25 19:22:35 -04:00
parent b52f782d92
commit 5603bf0584
1 changed files with 2 additions and 0 deletions

View File

@ -855,6 +855,7 @@ $(document).ready(function(){
$('#gamescreen').animate({scrollTop: $('#gamescreen').prop('scrollHeight')}, 1000); $('#gamescreen').animate({scrollTop: $('#gamescreen').prop('scrollHeight')}, 1000);
}, 5); }, 5);
} else if(msg.cmd == "updatechunk") { } else if(msg.cmd == "updatechunk") {
hideMessage();
const {index, html, last} = msg.data; const {index, html, last} = msg.data;
const existingChunk = game_text.children(`#n${index}`) const existingChunk = game_text.children(`#n${index}`)
const newChunk = $(html); const newChunk = $(html);
@ -875,6 +876,7 @@ $(document).ready(function(){
}, 5); }, 5);
} }
} else if(msg.cmd == "removechunk") { } else if(msg.cmd == "removechunk") {
hideMessage();
let index = msg.data; let index = msg.data;
// Remove the chunk // Remove the chunk
game_text.children(`#n${index}`).remove() game_text.children(`#n${index}`).remove()