From 19a72ec261e29ad4c0243d8f3851b6c5b1c05d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Fri, 9 Dec 2016 08:03:36 +0100 Subject: [PATCH] WIP --- .../components/wp-table/timeline/wp-timeline.header.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/app/components/wp-table/timeline/wp-timeline.header.ts b/frontend/app/components/wp-table/timeline/wp-timeline.header.ts index 04fc62b2b0..11b6d46820 100644 --- a/frontend/app/components/wp-table/timeline/wp-timeline.header.ts +++ b/frontend/app/components/wp-table/timeline/wp-timeline.header.ts @@ -40,6 +40,7 @@ import {InteractiveTableController} from './../../common/interactive-table/inter import Moment = moment.Moment; const cssClassTableBody = ".work-package-table tbody"; +const cssClassTableContainer = ".generic-table--results-container"; const cssClassHeader = ".wp-timeline-header"; const cssHeaderContainer = ".wp-timeline-header-container"; @@ -69,6 +70,9 @@ export class WpTimelineHeader { /** Height of the table body + table header */ private globalHeight: number; + /** The total outer height available to the wrapping container */ + private containerHeight: number; + private activeZoomLevel: ZoomLevel; constructor(protected wpTimeline:WorkPackageTimelineTableController) { @@ -176,8 +180,14 @@ export class WpTimelineHeader { this.setupScrollbar(); } + this.containerHeight = jQuery(cssClassTableContainer).outerHeight() + this.headerHeight; this.globalHeight = jQuery(cssClassTableBody).outerHeight() + this.headerHeight; this.marginTop = this.headerHeight; + + // Ensure the timeline is always rendered across the entire page. + if (this.globalHeight < this.containerHeight) { + this.globalHeight = this.containerHeight; + } this.headerCell.style.height = this.globalHeight + 'px'; }