2
0

prepared new parameters margin x and margin y

This commit is contained in:
2018-10-26 18:07:02 +02:00
parent 1da8689cfd
commit 6843a4abd6
5 changed files with 30 additions and 0 deletions

View File

@@ -17,6 +17,10 @@
export interface Config {
width: number;
height: number;
margin: {
x: number;
y: number;
};
start: {
x: number;
y: number;

View File

@@ -6,6 +6,20 @@
<div class="pb-5">
<h5>Grundfläche</h5>
<hr>
<ng-container formGroupName="margin">
<div class="form-group mb-4">
<label class="form-control-label">
X-Achse
</label>
<input type="number" class="form-control" min="0" formControlName="x">
</div>
<div class="form-group mb-4">
<label class="form-control-label">
Y-Achse
</label>
<input type="number" class="form-control" formControlName="y">
</div>
</ng-container>
<div class="form-group">
<label class="form-control-label">
Breite

View File

@@ -19,6 +19,10 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
const fb = new FormBuilder();
export let ConfigForm: FormGroup = fb.group({
margin: fb.group({
x: fb.control('', Validators.min(0)),
y: fb.control('', Validators.min(0))
}),
width: fb.control('', Validators.required),
height: fb.control('', Validators.required),
vectors: fb.group({

View File

@@ -26,6 +26,10 @@ export const environment = {
autoHeight: false
},
formDefaults: {
margin: {
x: 0,
y: 0
},
width: 10,
height: 16,
scale: 0.4,

View File

@@ -27,6 +27,10 @@ export const environment = {
autoHeight: true
},
formDefaults: {
margin: {
x: 0,
y: 0
},
width: 1e-10,
height: 1,
scale: 0.4,