Skip to content
Snippets Groups Projects
Commit 0138c0ea authored by rhenck's avatar rhenck
Browse files

Fix geometry properties and add customToolBar prop

parent c517c7b0
No related branches found
No related tags found
No related merge requests found
Pipeline #41639 passed
......@@ -48,6 +48,7 @@ export class GeometryComponent extends ElementComponent implements AfterViewInit
enableShiftDragZoom: this.elementModel.enableShiftDragZoom,
showZoomButtons: this.elementModel.showZoomButtons,
showFullscreenButton: this.elementModel.showFullscreenButton,
customToolBar: this.elementModel.customToolBar,
showMenuBar: false,
showAlgebraInput: false,
enableLabelDrags: false,
......
......@@ -15,12 +15,20 @@ export class GeometryElement extends UIElement implements PositionedUIElement {
enableShiftDragZoom: boolean = true;
showZoomButtons: boolean = true;
showFullscreenButton: boolean = true;
customToolBar: string = '';
position: PositionProperties;
constructor(element: Partial<GeometryElement>) {
super(element);
this.appDefinition = element.appDefinition !== undefined ? element.appDefinition : '';
this.width = element.width !== undefined ? element.width : 600;
this.height = element.height !== undefined ? element.height : 400;
this.showResetIcon = element.showResetIcon !== undefined ? element.showResetIcon : true;
this.showToolbar = element.showToolbar !== undefined ? element.showToolbar : true;
this.enableShiftDragZoom = element.enableShiftDragZoom !== undefined ? element.enableShiftDragZoom : true;
this.showZoomButtons = element.showZoomButtons !== undefined ? element.showZoomButtons : true;
this.showFullscreenButton = element.showFullscreenButton !== undefined ? element.showFullscreenButton : true;
this.customToolBar = element.customToolBar !== undefined ? element.customToolBar : '';
this.position = ElementFactory.initPositionProps({ ...element.position });
}
......
......@@ -190,5 +190,13 @@
{{'propertiesPanel.showFullscreenButton' | translate }}
</mat-checkbox>
<mat-form-field *ngIf="combinedProperties.customToolBar != null"
matTooltip="{{'propertiesPanel.customToolbarHelp' | translate }}"
appearance="fill">
<mat-label>{{'propertiesPanel.customToolbar' | translate }}</mat-label>
<input matInput [value]="$any(combinedProperties.customToolbar)"
(input)="updateModel.emit({ property: 'customToolBar', value: $any($event.target).value })">
</mat-form-field>
</div>
......@@ -174,7 +174,10 @@
"showResetIcon": "Zurücksetzen-Knopf anzeigen",
"showToolbar": "Werkzeugleiste anzeigen",
"showZoomButtons": "Zoom-Knöpfe anzeigen",
"showFullscreenButton": "Vollbild-Knopf anzeigen"
"showFullscreenButton": "Vollbild-Knopf anzeigen",
"enableShiftDragZoom": "Bewegen und Zoom erlauben",
"customToolBar": "Anpassung Werkzeugleiste",
"customToolbarHelp": "Hier kann definiert werden, welche Elemente auf der Werkzeigleiste angezeigt werden sollen. Für Details bitte die Dokumentation konsultieren."
},
"player": {
"autoStart": "Autostart (nicht für Tablets)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment