mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-26 14:58:00 +01:00
Updated resizer to work on mobile
This commit is contained in:
parent
b527f9c600
commit
1edc3e8992
2 changed files with 9 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -34,9 +34,10 @@ window.handleResize = () ->
|
|||
'max-height': newMaxHeight
|
||||
|
||||
$('.stretch-to-bottom').each () ->
|
||||
if !isMobile
|
||||
$this = $ this
|
||||
newHeight = windowHeight - $this.offset().top
|
||||
if isMobile
|
||||
newHeight = newHeight - 5
|
||||
if window.isPlaying
|
||||
newHeight = newHeight - $('.now-playing').height()
|
||||
if newHeight > 0
|
||||
|
|
Loading…
Reference in a new issue