diff --git a/resources/assets/scripts/app/controllers/application.coffee b/resources/assets/scripts/app/controllers/application.coffee index b8cfb67f..fcd01347 100644 --- a/resources/assets/scripts/app/controllers/application.coffee +++ b/resources/assets/scripts/app/controllers/application.coffee @@ -53,6 +53,7 @@ module.exports = angular.module('ponyfm').controller "application", [ $rootScope.$on 'player-starting-track', () -> $scope.isPlaying = true window.isPlaying = true + window.handleResize() $rootScope.$on 'player-stopping', () -> $scope.isPlaying = false diff --git a/resources/assets/scripts/shared/layout.coffee b/resources/assets/scripts/shared/layout.coffee index 3f561f39..ed5e01f7 100644 --- a/resources/assets/scripts/shared/layout.coffee +++ b/resources/assets/scripts/shared/layout.coffee @@ -34,13 +34,14 @@ window.handleResize = () -> 'max-height': newMaxHeight $('.stretch-to-bottom').each () -> - if !isMobile - $this = $ this - newHeight = windowHeight - $this.offset().top - if window.isPlaying - newHeight = newHeight - $('.now-playing').height() - if newHeight > 0 - $this.height newHeight + $this = $ this + newHeight = windowHeight - $this.offset().top + if isMobile + newHeight = newHeight - 5 + if window.isPlaying + newHeight = newHeight - $('.now-playing').height() + if newHeight > 0 + $this.height newHeight $('.revealable').each () -> $this = $ this