Resizing now changes to first page if there are too many elements

This commit is contained in:
Kasper Rynning-Tønnesen
2016-11-22 10:21:01 +01:00
parent bbb0d6b7a6
commit 65375765bc
2 changed files with 7 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -873,7 +873,11 @@ $(document).on("click", "#closeSettings", function(e)
$(window).resize(function(){
if(chan){
List.can_fit = Math.round(($("#wrapper").height()) / 71)+1;
var temp_fit = Math.round(($("#wrapper").height()) / 71)+1;
if(temp_fit > List.can_fit || temp_fit < List.can_fit){
List.dynamicContentPage(-10);
}
List.can_fit = temp_fit;
List.element_height = (($("#wrapper").height()) / List.can_fit)-6;
$(".list-song").css("height", List.element_height + "px");
}