Fixed userlist breaking the page layout

This commit is contained in:
rainbow napkin 2024-12-05 04:46:57 -05:00
parent a20bb99af2
commit 3f0af3a519
3 changed files with 26 additions and 6 deletions

View file

@ -196,14 +196,19 @@ class chatBox{
//Fix busted layout
var pageBreak = document.body.scrollWidth - document.body.getBoundingClientRect().width;
this.chatPanel.style.width = `${this.chatPanel.getBoundingClientRect().width + pageBreak}px`;
//This sometimes gets called before userList ahs been initiated :p
if(this.client.userList != null){
this.client.userList.clickDragger.fixCutoff();
}
}
}
toggleUI(show = this.chatPanel.style.display == "none"){
toggleUI(show = !this.chatPanel.checkVisibility()){
if(show){
this.chatPanel.style.display = "flex";
this.showChatIcon.style.display = "none";
this.client.player.hideVideoIcon.style.display = "flex";
this.client.userList.clickDragger.fixCutoff();
}else{
this.chatPanel.style.display = "none";
this.showChatIcon.style.display = "flex";