1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-11 18:15:32 +00:00

Resize project list correctly on page load

This commit is contained in:
James Allen 2014-07-28 10:28:48 +01:00
parent ce47f75058
commit 06eb952994

View file

@ -50,7 +50,7 @@ define [
]
App.controller "ProjectPageController", ($scope, $modal, $q, $window, queuedHttp, event_tracking) ->
App.controller "ProjectPageController", ($scope, $modal, $q, $window, queuedHttp, event_tracking, $timeout) ->
$scope.projects = window.data.projects
$scope.tags = window.data.tags
$scope.allSelected = false
@ -75,8 +75,10 @@ define [
if height < sideBarHeight
height = Math.min(sideBarHeight, $window.innerHeight - topOffset - 25)
$scope.projectListHeight = height
recalculateProjectListHeight()
$timeout () ->
recalculateProjectListHeight()
, 0
angular.element($window).bind "resize", () ->
recalculateProjectListHeight()
$scope.$apply()