angular-gantt
Version:
Gantt chart component for AngularJS
24 lines (18 loc) • 833 B
JavaScript
(function(){
'use strict';
angular.module('gantt.tree').directive('ganttTreeBody', ['GanttDirectiveBuilder', 'ganttLayout', function(Builder, layout) {
var builder = new Builder('ganttTreeBody', 'plugins/tree/treeBody.tmpl.html');
builder.controller = function($scope) {
var hScrollBarHeight = layout.getScrollBarHeight();
$scope.getLabelsCss = function() {
var css = {};
if ($scope.maxHeight) {
var bodyScrollBarHeight = $scope.gantt.scroll.isHScrollbarVisible() ? hScrollBarHeight : 0;
css['max-height'] = $scope.maxHeight - bodyScrollBarHeight - $scope.gantt.header.getHeight() + 'px';
}
return css;
};
};
return builder.build();
}]);
}());