Implement navigation (forward) in interaction sequence
All checks were successful
E2E Testing / test (push) Successful in 1m18s

This commit is contained in:
sebastian 2024-06-17 22:22:12 +02:00
parent 3d899251eb
commit 189b77b8ef
3 changed files with 17 additions and 2 deletions

View File

@ -40,7 +40,7 @@
<th mat-header-cell *matHeaderCellDef>Label</th>
<td mat-cell *matCellDef="let interaction">
@if(interaction != editedElement) {
{{interaction.interactionLabel}}
<a class="navigation-link" (click)="onNavigateToInteraction(interaction)"> {{interaction.interactionLabel}}</a>
} @else {
<mat-form-field appearance="fill" class="long-form">
<mat-label>Label</mat-label>

View File

@ -53,3 +53,13 @@ tr.example-element-row:not(.example-expanded-row):active {
.warning {
color: red;
}
.navigation-link {
text-decoration: none;
color: white;
}
.navigation-link:hover {
text-decoration: underline;
}

View File

@ -38,12 +38,12 @@ export class InteractionSequenceEditorComponent implements OnInit{
}
ngOnInit() {
if(this.interactionSequence != undefined) {
this.currentInteractionNode = this.interactionSequence!.rootInteraction.root;
this.assignData();
}
}
private assignData() {
this.currentInteractionNode = this.interactionSequence!.rootInteraction.root;
if(this.currentInteractionNode != undefined) {
this.sequenceDatasource.data = this.interactionSequence!.findInteraction(this.currentInteractionNode)!.children.map(node => node.root);
}
@ -106,4 +106,9 @@ export class InteractionSequenceEditorComponent implements OnInit{
interaction.removeAction(action);
}
}
onNavigateToInteraction(interaction: Interaction) {
this.currentInteractionNode = interaction;
this.assignData();
}
}