mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-30 00:28: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', () ->
|
$rootScope.$on 'player-starting-track', () ->
|
||||||
$scope.isPlaying = true
|
$scope.isPlaying = true
|
||||||
window.isPlaying = true
|
window.isPlaying = true
|
||||||
|
window.handleResize()
|
||||||
|
|
||||||
$rootScope.$on 'player-stopping', () ->
|
$rootScope.$on 'player-stopping', () ->
|
||||||
$scope.isPlaying = false
|
$scope.isPlaying = false
|
||||||
|
|
|
@ -34,9 +34,10 @@ window.handleResize = () ->
|
||||||
'max-height': newMaxHeight
|
'max-height': newMaxHeight
|
||||||
|
|
||||||
$('.stretch-to-bottom').each () ->
|
$('.stretch-to-bottom').each () ->
|
||||||
if !isMobile
|
|
||||||
$this = $ this
|
$this = $ this
|
||||||
newHeight = windowHeight - $this.offset().top
|
newHeight = windowHeight - $this.offset().top
|
||||||
|
if isMobile
|
||||||
|
newHeight = newHeight - 5
|
||||||
if window.isPlaying
|
if window.isPlaying
|
||||||
newHeight = newHeight - $('.now-playing').height()
|
newHeight = newHeight - $('.now-playing').height()
|
||||||
if newHeight > 0
|
if newHeight > 0
|
||||||
|
|
Loading…
Reference in a new issue