From 99eedb14d13cf6a695bf9ff9f0c7a3aedc94c7cc Mon Sep 17 00:00:00 2001 From: yackob03 Date: Thu, 17 Oct 2013 17:59:34 -0400 Subject: [PATCH] Wait until the image container is really already shown before calling resize. --- static/js/controllers.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index c3b58cc1c..7a6e8bd4b 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -270,7 +270,7 @@ function LandingCtrl($scope, $timeout, Restangular, UserService, KeyService) { browserchrome.update(); } -function RepoCtrl($scope, Restangular, $routeParams, $rootScope, $location) { +function RepoCtrl($scope, Restangular, $routeParams, $rootScope, $location, $timeout) { $rootScope.title = 'Loading...'; // Watch for changes to the tag parameter. @@ -329,7 +329,9 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope, $location) { $scope.$watch('repo', function() { if ($scope.tree) { - $scope.tree.notifyResized(); + $timeout(function() { + $scope.tree.notifyResized(); + }); } });