mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 12:01:32 +02:00
Resize project list correctly on page load
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user