calculate calendar height based on eternal element

pull/6834/head
Jens Ulferts 6 years ago
parent 9b99fd4b43
commit 4e25cec505
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 15
      frontend/src/app/components/wp-calendar/wp-calendar.component.ts

@ -204,9 +204,20 @@ export class WorkPackagesCalendarController implements OnInit, OnDestroy {
private get staticOptions() {
return {
editable: false,
eventLimit: 17,
eventLimit: false,
locale: this.i18n.locale,
height: 400,
height: () => {
let heightElement = jQuery(this.element.nativeElement);
while (!heightElement.height() && heightElement.parent()) {
heightElement = heightElement.parent();
}
let topOfCalendar = jQuery(this.element.nativeElement).position().top;
let topOfHeightElement = heightElement.position().top;
return heightElement.height() - (topOfCalendar - topOfHeightElement);
},
header: {
left: '',
center: '',

Loading…
Cancel
Save