Skip to content

Commit a8ca4b3

Browse files
authored
fixed patternid missing for edited pattern (#165)
1 parent 796afb5 commit a8ca4b3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/app/core/component/create-pattern-relation/create-pattern-relation.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export class CreatePatternRelationComponent implements OnInit {
8888
}
8989
const type = dialogResult.relationType ? dialogResult.relationType : null;
9090
const description = dialogResult.description ? dialogResult.description : null;
91+
dialogResult.firstPattern.id = this.data.callerPatternId;
9192
switch (dialogResult.direction.name) {
9293
case PatternRelationDescriptorDirection.DirectedRight:
9394
return new DirectedEdgeModel(dialogResult.firstPattern, dialogResult.secondPattern, this.data.patternLanguage, description, type,
@@ -114,6 +115,7 @@ export class CreatePatternRelationComponent implements OnInit {
114115
export interface DialogData {
115116
relationType: string;
116117
description: string;
118+
callerPatternId: string;
117119
firstPattern?: Pattern;
118120
secondPattern?: Pattern;
119121
preselectedEdgeDirection?: PatternRelationDescriptorDirection;

src/app/core/default-pattern-renderer/default-pattern-renderer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class DefaultPatternRendererComponent implements AfterViewInit, OnDestroy
233233

234234
private showAndHandleLinkDialog() {
235235
const dialogRef = this.dialog.open(CreatePatternRelationComponent,
236-
{ data: { firstPattern: this.pattern, patterns: this.patterns } }
236+
{ data: { firstPattern: this.pattern, patterns: this.patterns, callerPatternId: this.patternId } }
237237
);
238238
const dialogSubscription = dialogRef.afterClosed().pipe(
239239
switchMap((edge) => {

0 commit comments

Comments
 (0)