Fix resize issue on build pack tree
This commit is contained in:
parent
d1922c6fd2
commit
0e566b63cf
2 changed files with 7 additions and 4 deletions
|
@ -785,7 +785,10 @@ function BuildPackageCtrl($scope, Restangular, ApiService, $routeParams, $rootSc
|
|||
};
|
||||
|
||||
$scope.initializeTree = function() {
|
||||
if ($scope.drawn) { return; }
|
||||
if ($scope.drawn) {
|
||||
$scope.tree.notifyResized();
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.drawn = true;
|
||||
$timeout(function() {
|
||||
|
|
|
@ -857,10 +857,10 @@ FileTreeBase.prototype.calculateDimensions_ = function(container) {
|
|||
|
||||
var margin = { top: 40, right: 00, bottom: 20, left: 20 };
|
||||
var m = [margin.top, margin.right, margin.bottom, margin.left];
|
||||
var w = cw - m[1] - m[3];
|
||||
var h = ch - m[0] - m[2];
|
||||
var w = Math.max(0, cw - m[1] - m[3]);
|
||||
var h = Math.max(0, ch - m[0] - m[2]);
|
||||
|
||||
var barWidth = cw * 0.8 - m[1] - m[3];
|
||||
var barWidth = Math.max(0, cw * 0.8 - m[1] - m[3]);
|
||||
|
||||
return {
|
||||
'w': w,
|
||||
|
|
Reference in a new issue