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:
parent
ce47f75058
commit
06eb952994
1 changed files with 5 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue