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', () ->
|
$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,13 +34,14 @@ 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
|
||||||
if window.isPlaying
|
newHeight = newHeight - 5
|
||||||
newHeight = newHeight - $('.now-playing').height()
|
if window.isPlaying
|
||||||
if newHeight > 0
|
newHeight = newHeight - $('.now-playing').height()
|
||||||
$this.height newHeight
|
if newHeight > 0
|
||||||
|
$this.height newHeight
|
||||||
|
|
||||||
$('.revealable').each () ->
|
$('.revealable').each () ->
|
||||||
$this = $ this
|
$this = $ this
|
||||||
|
|
Loading…
Reference in a new issue