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>
|
</td>
|
||||||
</ng-container>
|
</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">
|
<ng-container matColumnDef="delete">
|
||||||
<th mat-header-cell *matHeaderCellDef></th>
|
<th mat-header-cell *matHeaderCellDef></th>
|
||||||
<td mat-cell *matCellDef="let transition">
|
<td mat-cell *matCellDef="let transition">
|
||||||
|
@ -24,7 +24,7 @@ export class TemplateTransitionEditorComponent {
|
|||||||
|
|
||||||
@Input() templateGamesystem: TemplateGamesystem | undefined
|
@Input() templateGamesystem: TemplateGamesystem | undefined
|
||||||
@Input() scriptAccounts: ScriptAccount[] = []
|
@Input() scriptAccounts: ScriptAccount[] = []
|
||||||
displayedColumns: string[] = ["starting-state", "ending-state", "edit", "delete"];
|
displayedColumns: string[] = ["starting-state", "ending-state", "delete"];
|
||||||
dataSource = new MatTableDataSource<SimpleTransition>();
|
dataSource = new MatTableDataSource<SimpleTransition>();
|
||||||
columnsToDisplayWithExpand = [...this.displayedColumns, 'expand'];
|
columnsToDisplayWithExpand = [...this.displayedColumns, 'expand'];
|
||||||
expandedElement: SimpleTransition | null = null;
|
expandedElement: SimpleTransition | null = null;
|
||||||
@ -44,23 +44,18 @@ export class TemplateTransitionEditorComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onCreateCondition(transition: SimpleTransition, condition: ScriptAccountCondition) {
|
onCreateCondition(transition: SimpleTransition, condition: ScriptAccountCondition) {
|
||||||
|
transition.addScriptAccountCondition(condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteCondition(transition: SimpleTransition, condition: ScriptAccountCondition) {
|
deleteCondition(transition: SimpleTransition, condition: ScriptAccountCondition) {
|
||||||
|
transition.removeScriptAccountCondition(condition.scriptAccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteTransition(transition: SimpleTransition) {
|
deleteTransition(transition: SimpleTransition) {
|
||||||
|
this.templateGamesystem!.templateTransitions = this.templateGamesystem!.templateTransitions.filter(templateTranstion =>
|
||||||
}
|
templateTranstion.startingState.stateLabel !== transition.startingState.stateLabel &&
|
||||||
|
templateTranstion.endingState.stateLabel !== transition.endingState.stateLabel);
|
||||||
onEditTransition(transition: SimpleTransition) {
|
this.dataSource.data = this.templateGamesystem!.templateTransitions
|
||||||
if(this.editedTransition == undefined) {
|
|
||||||
this.editedTransition = transition
|
|
||||||
} else {
|
|
||||||
this.editedTransition = undefined
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extractReferencedTransition(transition: SimpleTransition) {
|
extractReferencedTransition(transition: SimpleTransition) {
|
||||||
|
Loading…
Reference in New Issue
Block a user