Skip to content

Commit

Permalink
Merge pull request #95 from PatternAtlas/fix/add-pattern-in-graph
Browse files Browse the repository at this point in the history
Fixing bug that patterns do not get updated on card view when adding …
  • Loading branch information
manuwei authored Mar 17, 2021
2 parents e62a249 + a7e6535 commit 8738c96
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class GraphDisplayComponent implements AfterContentInit, OnChanges {

@Output() addedEdge = new EventEmitter<any>();
@Output() removedEdge = new EventEmitter<any>();
@Output() updatedGraphEvent = new EventEmitter<void>();
@Output() updatedGraphEvent = new EventEmitter<any>();
@Output() deletePatternEvent = new EventEmitter<string>();
@Output() aggregationAssignmentsUpdate = new EventEmitter<{ [key: string]: string }>();

Expand Down Expand Up @@ -268,7 +268,7 @@ export class GraphDisplayComponent implements AfterContentInit, OnChanges {
switchMap(result => result ? this.getCurrentPatternViewAndPatterns() : EMPTY))
.subscribe(
(res) => {
this.updatedGraphEvent.emit();
this.updatedGraphEvent.emit(res);
if (res) {
this.reformatGraph();
this.toastService.pop('success', 'Pattern added');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
patternLanguage: null, patternContainer: this.patternViewResponse,
patternLanguages: this.patternLanguages
}"
(addedEdge)="handleLinkAddedInGraphEditor($event)" (removedEdge)="handleLinkRemovedInGraphEditor($event)" [showPatternLanguageName]="true"
(addedEdge)="handleLinkAddedInGraphEditor($event)" (removedEdge)="handleLinkRemovedInGraphEditor($event)"
(updatedGraphEvent)="addPatternFromGraphToView($event)"
[showPatternLanguageName]="true"
[showViewRelations]="true"></pp-graph-display>


Original file line number Diff line number Diff line change
Expand Up @@ -569,4 +569,8 @@ export class PatternViewRendererComponent implements OnInit, AfterViewInit {
});
return types;
}

addPatternFromGraphToView(patternList: any) {
this.patterns = patternList
}
}

0 comments on commit 8738c96

Please sign in to comment.