aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts')
-rw-r--r--sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts21
1 files changed, 13 insertions, 8 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts
index b114d0ae..f132a07f 100644
--- a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts
@@ -33,25 +33,30 @@ export class SequenceFlowComponent implements AfterViewInit {
public show = false;
constructor(private broadcastService: BroadcastService,
- private processService: ModelService,
+ private modelService: ModelService,
private jsPlumbService: JsPlumbService) {
}
public ngAfterViewInit() {
- this.broadcastService.showSequenceFlow$.subscribe(show => this.show = show);
- this.broadcastService.sequenceFlow$.subscribe(tmp => this.sequenceFlow = tmp);
+ this.broadcastService.showProperty$.subscribe(element => {
+ if (element && !this.modelService.isNode(element)) {
+ this.sequenceFlow = element as SequenceFlow;
+ this.show = true;
+ } else {
+ this.show = false;
+ }
+ });
}
- public conditionChanged(condition: string) {
- this.sequenceFlow.condition = condition;
- this.jsPlumbService.setLabel(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef, condition);
+ public nameChanged(name: string) {
+ this.sequenceFlow.name = name;
+ this.jsPlumbService.setLabel(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef, name);
}
public delete() {
this.show = false;
-
- this.processService.deleteConnection(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef);
+ this.modelService.deleteConnection(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef);
this.jsPlumbService.deleteConnect(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef);
}
}