Merge pull request #5236 from opf/fix/timeline/scroll-update

Force global (and header) refresh on timeline toggle
pull/5241/head
Oliver Günther 8 years ago committed by GitHub
commit c0084290af
  1. 14
      frontend/app/components/wp-table/timeline/wp-timeline-container.directive.ts
  2. 2
      frontend/app/components/wp-table/timeline/wp-timeline.header.ts

@ -70,6 +70,15 @@ export class WorkPackageTimelineTableController {
this.refreshView();
});
states.table.timelineVisible
.observeOnScope($scope)
.subscribe((visible) => {
if (visible) {
this.refreshView();
}
});
// TODO: Load only necessary types from API
TypeResource.loadAll();
}
@ -80,11 +89,6 @@ export class WorkPackageTimelineTableController {
public toggle() {
this.visible = !this.visible;
this.states.table.timelineVisible.put(this.visible);
// If hiding view, resize table afterwards
if (!this.visible) {
jQuery(window).trigger('resize');
}
}
/**

@ -202,7 +202,7 @@ export class WpTimelineHeader {
}
this.containerHeight = jQuery(cssClassTableContainer).outerHeight() + this.headerHeight;
this.globalHeight = jQuery(cssClassTableBody).outerHeight() + this.headerHeight;
this.globalHeight = jQuery(cssClassTableBody).outerHeight();
this.marginTop = this.headerHeight;
this.headerCell.style.height = this.globalHeight + 'px';

Loading…
Cancel
Save