From dde6b9f1a1698eff4928b7040e16e229ad42a05e Mon Sep 17 00:00:00 2001 From: Roman Roelofsen Date: Wed, 8 Feb 2017 14:25:34 +0100 Subject: [PATCH] Use observeOnScope --- .../wp-table/timeline/wp-timeline-container.directive.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/wp-table/timeline/wp-timeline-container.directive.ts b/frontend/app/components/wp-table/timeline/wp-timeline-container.directive.ts index ec07115d5d..070539c249 100644 --- a/frontend/app/components/wp-table/timeline/wp-timeline-container.directive.ts +++ b/frontend/app/components/wp-table/timeline/wp-timeline-container.directive.ts @@ -53,7 +53,8 @@ export class WorkPackageTimelineTableController { public disableViewParamsCalculation = false; - constructor(private $element: ng.IAugmentedJQuery, + constructor(private $scope: IScope, + private $element: ng.IAugmentedJQuery, private TypeResource, private states: States) { @@ -111,7 +112,7 @@ export class WorkPackageTimelineTableController { addWorkPackage(wpId: string): Observable { // console.log("addWorkPackage() = " + wpId); - const wpObs = this.states.workPackages.get(wpId).observe(null) + const wpObs = this.states.workPackages.get(wpId).observeOnScope(this.$scope) .map((wp: any) => { this.workPackagesInView[wp.id] = wp; const viewParamsChanged = this.calculateViewParams(this._viewParameters);