Call setTag in the right place. Remove spurious console logging.
This commit is contained in:
parent
6d75c28ecd
commit
ace813d88d
1 changed files with 2 additions and 2 deletions
|
@ -317,12 +317,13 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
$scope.tree = new ImageHistoryTree(namespace, name, resp.images,
|
||||
$scope.getCommentFirstLine, $scope.getTimeSince);
|
||||
|
||||
$scope.tree.draw('image-history-container');
|
||||
|
||||
// If we already have a tag, use it
|
||||
if ($scope.currentTag) {
|
||||
$scope.tree.setTag($scope.currentTag.name);
|
||||
}
|
||||
|
||||
$scope.tree.draw('image-history-container');
|
||||
$($scope.tree).bind('tagChanged', function(e) {
|
||||
$scope.$apply(function() { $scope.setTag(e.tag); });
|
||||
});
|
||||
|
@ -353,7 +354,6 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
}
|
||||
|
||||
if (proposedTag) {
|
||||
console.log('Setting tag to: ' + proposedTag.name);
|
||||
$scope.currentTag = proposedTag;
|
||||
$scope.currentImage = $scope.currentTag.image;
|
||||
if ($scope.tree) {
|
||||
|
|
Reference in a new issue