UNPKG

angular-gantt

Version:

Gantt chart component for AngularJS

26 lines (20 loc) 784 B
require('./treeBody.tmpl.html') require('./treeBodyChildren.tmpl.html') export default function (GanttDirectiveBuilder, ganttLayout) { 'ngInject' let builder = new GanttDirectiveBuilder('ganttTreeBody', 'plugins/tree/treeBody.tmpl.html') builder.controller = function ($scope) { let hScrollBarHeight = ganttLayout.getScrollBarHeight() $scope.getLabelsCss = function () { let css = {} let maxHeight = $scope.maxHeight if (!maxHeight) { maxHeight = $scope.gantt.getContainerHeight() } let bodyScrollBarHeight = $scope.gantt.scroll.isHScrollbarVisible() ? hScrollBarHeight : 0 css['max-height'] = maxHeight - bodyScrollBarHeight - $scope.gantt.header.getHeight() + 'px' return css } } return builder.build() }