Switch active tab if opening component that is already opened
All checks were successful
E2E Testing / test (push) Successful in 1m32s
All checks were successful
E2E Testing / test (push) Successful in 1m32s
This commit is contained in:
parent
0fe23b9e39
commit
fa7a59ffc4
@ -21,6 +21,8 @@ export class EditorComponent {
|
||||
if(!this.gameModelComponents.includes(gameModelComponent)) {
|
||||
this.gameModelComponents.push(gameModelComponent);
|
||||
this.activeTab = this.gameModelComponents.length;
|
||||
} else {
|
||||
this.activeTab = this.gameModelComponents.findIndex(component => component.componentName === gameModelComponent.componentName);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user