Skip to content

Commit 9509f8e

Browse files
added a fix for uncentered hand when chat is disabled
1 parent 07ebda6 commit 9509f8e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/res/js/match/match.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,13 @@
429429
*/
430430
function toggleChat() {
431431
$("#chat-container").toggle()
432-
$("#toggle-chat-button").html(($("#chat-container").is(":visible") ? "Hide" : "Show") + " Chat")
432+
let chatVisible = $("#chat-container").is(":visible")
433+
$("#toggle-chat-button").html((chatVisible ? "Hide" : "Show") + " Chat")
434+
435+
// The match hand has the width of the chat hardcoded in its container
436+
// size. When the chat is invisible, the hand should be centered in the
437+
// new view.
438+
$(".match-hand").css("width", chatVisible ? "" : "100vw")
433439
}
434440

435441
setInterval(loadStatus, 1000)

0 commit comments

Comments
 (0)