diff --git a/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/ele-specific/math-table-properties.component.ts b/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/ele-specific/math-table-properties.component.ts index 8eb40655f34af8bd1fb595b23334a1d4c0951d16..635c8c48bb6e1b44fa76eaa2259d9535de027bdb 100644 --- a/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/ele-specific/math-table-properties.component.ts +++ b/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/ele-specific/math-table-properties.component.ts @@ -16,6 +16,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatButtonModule } from '@angular/material/button'; import { MatMenuModule } from '@angular/material/menu'; import { MatCheckboxModule } from '@angular/material/checkbox'; +import { UnitService } from 'editor/src/app/services/unit-services/unit.service'; @Component({ selector: 'aspect-math-table-properties', @@ -33,7 +34,7 @@ import { MatCheckboxModule } from '@angular/material/checkbox'; ], template: ` <div [style.display]="'flex'" [style.flex-direction]="'column'"> - <mat-form-field> + <mat-form-field *ngIf="unitService.expertMode"> <mat-label>Operation</mat-label> <mat-select [value]="combinedProperties.operation" (selectionChange)="updateModel.emit({ property: 'operation', value: $event.value })"> @@ -83,7 +84,7 @@ import { MatCheckboxModule } from '@angular/material/checkbox'; </mat-form-field> - <button mat-raised-button color="primary" + <button *ngIf="unitService.expertMode" mat-raised-button color="primary" [disabled]="combinedProperties.operation !== 'variable'" [matMenuTriggerFor]="variableLayoutOptions"> Variables Layout anpassen @@ -142,6 +143,8 @@ export class MathTablePropertiesComponent { @ViewChildren('termInput') termInputs!: QueryList<ElementRef>; + constructor(public unitService: UnitService) { } + addTerm() { (this.combinedProperties.terms as string[]).push(''); this.updateModel.emit({ property: 'terms', value: this.combinedProperties.terms as string[] });