Added improved settings panel.
This commit is contained in:
parent
306f22aa93
commit
132fdabb29
105 changed files with 3447 additions and 252 deletions
|
|
@ -38,6 +38,11 @@ class chatBox{
|
|||
*/
|
||||
this.autoScroll = true;
|
||||
|
||||
/**
|
||||
* Chat-Width Minimum while sized to media Aspect-Ratio
|
||||
*/
|
||||
this.chatWidthMinimum = localStorage.getItem('chatWidthMin') / 100;
|
||||
|
||||
/**
|
||||
* Chat Buffer Scroll Top on last scroll
|
||||
*/
|
||||
|
|
@ -500,10 +505,10 @@ L /**
|
|||
var targetVidWidth = this.client.player.getRatio() * this.chatPanel.getBoundingClientRect().height;
|
||||
const targetChatWidth = window.innerWidth - targetVidWidth;
|
||||
//This should be changeable in settings later on, for now it defaults to 20%
|
||||
const limit = window.innerWidth * .2;
|
||||
const limit = window.innerWidth * this.chatWidthMinimum;
|
||||
|
||||
//Set width to target or 20vh depending on whether or not we've hit the width limit
|
||||
this.chatPanel.style.flexBasis = targetChatWidth > limit ? `${targetChatWidth}px` : '20vh';
|
||||
//Set width to target or 20vw depending on whether or not we've hit the width limit
|
||||
this.chatPanel.style.flexBasis = targetChatWidth > limit ? `${targetChatWidth}px` : `${this.chatWidthMinimum * 100}vw`;
|
||||
|
||||
//Fix busted layout
|
||||
var pageBreak = document.body.scrollWidth - document.body.getBoundingClientRect().width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue