pull/4927/head
Oliver Günther 8 years ago
parent 50e9da5ad3
commit 6087e6fe80
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 4
      frontend/app/components/common/ui/detect-dimension-changes.directive.ts
  2. 12
      frontend/app/components/wp-table/timeline/wp-timeline-global.directive.ts

@ -28,6 +28,7 @@
import {opUiComponentsModule} from '../../../angular-modules';
import {opApiModule} from './../../../angular-modules';
import {debugLog} from '../../../helpers/debug_output';
function requestInterval(fn:Function, delay:number) {
let start:number = new Date().getTime();
@ -55,7 +56,6 @@ function detectDimensionChanges($window:ng.IWindowService) {
let height = 0, width = 0;
requestInterval(() => {
console.log("HEIGHT CHECK");
let newHeight = el.offsetHeight;
let newWidth = el.offsetWidth;
@ -63,7 +63,7 @@ function detectDimensionChanges($window:ng.IWindowService) {
if (newHeight !== height ||
newWidth !== width) {
console.log("HEIGHT TRIGGER");
debugLog('Dimension change detected on ', element);
element.trigger(opDimensionEventName);
height = newHeight;

@ -1,4 +1,4 @@
import {WorkPackageResource} from '../../api/api-v3/hal-resources/work-package-resource.service';
// -- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2017 the OpenProject Foundation (OPF)
@ -34,6 +34,8 @@ import {States} from '../../states.service';
import {HalRequestService} from '../../api/api-v3/hal-request/hal-request.service';
import {RelationResource} from '../../api/api-v3/hal-resources/relation-resource.service';
import {CollectionResource} from '../../api/api-v3/hal-resources/collection-resource.service';
import {debugLog} from '../../../helpers/debug_output';
import {WorkPackageResource} from '../../api/api-v3/hal-resources/work-package-resource.service';
import IScope = angular.IScope;
@ -88,7 +90,6 @@ export class WpTimelineGlobalService {
{
filter: [{ involved: {operator: '=', values: this.workPackageIdOrder } }]
}).then((collection: CollectionResource) => {
console.log('displayRelation');
this.elements = [];
this.removeAllElements();
collection.elements.forEach((relation: RelationResource) => {
@ -99,10 +100,6 @@ export class WpTimelineGlobalService {
this.renderElements();
});
});
setTimeout(() => {
jQuery('#work-packages-timeline-toggle-button').click();
}, 2000);
}
updateViewParameter(viewParams: TimelineViewParameters) {
@ -140,11 +137,10 @@ export class WpTimelineGlobalService {
private renderElements() {
if (this.viewParameters === undefined) {
console.log('renderElements() aborted - no viewParameters');
debugLog('renderElements() aborted - no viewParameters');
return;
}
console.debug('renderElements()');
const vp = this.viewParameters;
for (let e of this.elements) {

Loading…
Cancel
Save