Remove character senstive transition
All checks were successful
E2E Testing / test (push) Successful in 1m38s
All checks were successful
E2E Testing / test (push) Successful in 1m38s
This commit is contained in:
parent
221895520f
commit
38a11ad628
@ -41,14 +41,6 @@
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="edit">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let transition">
|
||||
<button mat-icon-button class="icon-btn-primary" *ngIf="editedTransition !== transition" [disabled]="editedTransition !== null" (click)="onEditTransition(transition)"><mat-icon>edit</mat-icon></button>
|
||||
<button mat-icon-button class="icon-btn-primary" *ngIf="editedTransition === transition" (click)="onEditTransition(transition)"><mat-icon>done</mat-icon></button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="delete">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let transition">
|
||||
|
@ -24,7 +24,7 @@ export class TemplateTransitionEditorComponent {
|
||||
|
||||
@Input() templateGamesystem: TemplateGamesystem | undefined
|
||||
@Input() scriptAccounts: ScriptAccount[] = []
|
||||
displayedColumns: string[] = ["starting-state", "ending-state", "edit", "delete"];
|
||||
displayedColumns: string[] = ["starting-state", "ending-state", "delete"];
|
||||
dataSource = new MatTableDataSource<SimpleTransition>();
|
||||
columnsToDisplayWithExpand = [...this.displayedColumns, 'expand'];
|
||||
expandedElement: SimpleTransition | null = null;
|
||||
@ -44,23 +44,18 @@ export class TemplateTransitionEditorComponent {
|
||||
}
|
||||
|
||||
onCreateCondition(transition: SimpleTransition, condition: ScriptAccountCondition) {
|
||||
|
||||
transition.addScriptAccountCondition(condition);
|
||||
}
|
||||
|
||||
deleteCondition(transition: SimpleTransition, condition: ScriptAccountCondition) {
|
||||
|
||||
transition.removeScriptAccountCondition(condition.scriptAccount);
|
||||
}
|
||||
|
||||
deleteTransition(transition: SimpleTransition) {
|
||||
|
||||
}
|
||||
|
||||
onEditTransition(transition: SimpleTransition) {
|
||||
if(this.editedTransition == undefined) {
|
||||
this.editedTransition = transition
|
||||
} else {
|
||||
this.editedTransition = undefined
|
||||
}
|
||||
this.templateGamesystem!.templateTransitions = this.templateGamesystem!.templateTransitions.filter(templateTranstion =>
|
||||
templateTranstion.startingState.stateLabel !== transition.startingState.stateLabel &&
|
||||
templateTranstion.endingState.stateLabel !== transition.endingState.stateLabel);
|
||||
this.dataSource.data = this.templateGamesystem!.templateTransitions
|
||||
}
|
||||
|
||||
extractReferencedTransition(transition: SimpleTransition) {
|
||||
|
Loading…
Reference in New Issue
Block a user