mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed scaling issues with chat and soundcloud players on resizing
This commit is contained in:
@@ -249,7 +249,7 @@ margin: auto;
|
|||||||
}
|
}
|
||||||
|
|
||||||
#chat-container, #suggestions{
|
#chat-container, #suggestions{
|
||||||
height:calc(100vh - 48px - 64px) !important;
|
height:calc(100vh - 48px - 64px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.channel-info-all-chat {
|
.channel-info-all-chat {
|
||||||
@@ -2914,7 +2914,7 @@ nav ul li:hover, nav ul li.active {
|
|||||||
|
|
||||||
|
|
||||||
#chat-container {
|
#chat-container {
|
||||||
height: calc(100vh - 48px - 64px - 120px) !important;
|
height: calc(100vh - 48px - 64px - 120px);
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -784,10 +784,17 @@ function resizePlaylistPlaying(playing) {
|
|||||||
if(window.innerWidth < 601) {
|
if(window.innerWidth < 601) {
|
||||||
var subtract = 0;
|
var subtract = 0;
|
||||||
if(playing) {
|
if(playing) {
|
||||||
Helper.css("#chat-bar", "height", window.innerHeight - 246 - subtract + "px");
|
var height = window.innerHeight - 246 - 170 - subtract;
|
||||||
|
Helper.css("#chat-bar", "height", height + "px");
|
||||||
|
Helper.css("#channelchat", "height", height - 130 + "px");
|
||||||
|
Helper.css("#all_chat", "height", height - 130 + "px");
|
||||||
|
Helper.css("#chat-container", "height", height + "px");
|
||||||
subtract = 200;
|
subtract = 200;
|
||||||
} else {
|
} else {
|
||||||
document.querySelector("#chat-bar").style.height = "";
|
document.querySelector("#chat-bar").style.height = "";
|
||||||
|
document.querySelector("#channelchat").style.height = "";
|
||||||
|
document.querySelector("#all_chat").style.height = "";
|
||||||
|
document.querySelector("#chat-container").style.height = "";
|
||||||
}
|
}
|
||||||
Helper.css("#wrapper", "height", window.innerHeight - 246 - subtract + "px");
|
Helper.css("#wrapper", "height", window.innerHeight - 246 - subtract + "px");
|
||||||
var temp_fit = Math.round(Helper.computedStyle("#wrapper", "height") / 71)+1;
|
var temp_fit = Math.round(Helper.computedStyle("#wrapper", "height") / 71)+1;
|
||||||
|
|||||||
@@ -1280,8 +1280,12 @@ window.addEventListener("resize", function(){
|
|||||||
if(chan && !Helper.mobilecheck()){
|
if(chan && !Helper.mobilecheck()){
|
||||||
if(window.innerWidth > 600 && document.querySelector("#wrapper").style.height != "") {
|
if(window.innerWidth > 600 && document.querySelector("#wrapper").style.height != "") {
|
||||||
document.querySelector("#wrapper").style.height = "";
|
document.querySelector("#wrapper").style.height = "";
|
||||||
|
document.querySelector("#chat-bar").style.height = "";
|
||||||
|
document.querySelector("#channelchat").style.height = "";
|
||||||
|
document.querySelector("#all_chat").style.height = "";
|
||||||
|
document.querySelector("#chat-container").style.height = "";
|
||||||
} else if(window.innerWidth < 601) {
|
} else if(window.innerWidth < 601) {
|
||||||
resizePlaylistPlaying(Player.player.getPlayerState() == YT.PlayerState.PLAYING);
|
resizePlaylistPlaying(Player.player.getPlayerState() == YT.PlayerState.PLAYING || Player.soundcloud_player.isPlaying());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var temp_fit = Math.round(Helper.computedStyle("#wrapper", "height") / 71)+1;
|
var temp_fit = Math.round(Helper.computedStyle("#wrapper", "height") / 71)+1;
|
||||||
|
|||||||
@@ -626,6 +626,9 @@ var Player = {
|
|||||||
end_programmatically = false;
|
end_programmatically = false;
|
||||||
} else {
|
} else {
|
||||||
was_stopped = true;
|
was_stopped = true;
|
||||||
|
if(!embed && !client && window.location.pathname != "/") {
|
||||||
|
resizePlaylistPlaying(false);
|
||||||
|
}
|
||||||
if(!chromecastAvailable){
|
if(!chromecastAvailable){
|
||||||
if(Helper.mobilecheck()) {
|
if(Helper.mobilecheck()) {
|
||||||
Helper.css("#playpause", "visibility", "visible");
|
Helper.css("#playpause", "visibility", "visible");
|
||||||
@@ -665,6 +668,10 @@ var Player = {
|
|||||||
|
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
if(!embed && !client && window.location.pathname != "/") {
|
||||||
|
resizePlaylistPlaying(true);
|
||||||
|
}
|
||||||
|
|
||||||
Helper.css("#playpause", "visibility", "visible");
|
Helper.css("#playpause", "visibility", "visible");
|
||||||
Helper.css("#playpause", "pointer-events", "all");
|
Helper.css("#playpause", "pointer-events", "all");
|
||||||
playing = true;
|
playing = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user