UNPKG

angular-gantt

Version:

Gantt chart component for AngularJS

24 lines (18 loc) 843 B
(function(){ 'use strict'; angular.module('gantt.labels').directive('ganttLabelsBody', ['GanttDirectiveBuilder', 'ganttLayout', function(Builder, layout) { var builder = new Builder('ganttLabelsBody', 'plugins/labels/labelsBody.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(); }]); }());