VoltageDrop Vorgaben ans Design angepasst
This commit is contained in:
parent
58496e74ec
commit
59b9ad5241
@ -1,62 +1,92 @@
|
|||||||
<div class="box">
|
<div class="tileContainer">
|
||||||
<div class="value">
|
|
||||||
<div class="label">Spannung</div>
|
<div class="tile">
|
||||||
<div class="input"><input type="number" [(ngModel)]="values.voltage" (ngModelChange)="update()"></div>
|
<div class="tileInner">
|
||||||
<div class="unit">V</div>
|
|
||||||
<div class="shortcuts">
|
<div class="tileTitle">
|
||||||
|
Vorgaben
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tileContent">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="label">Spannung</td>
|
||||||
|
<td class="input"><input type="number" [(ngModel)]="values.voltage" (ngModelChange)="update()"></td>
|
||||||
|
<td class="unit">V</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="shortcuts">
|
||||||
<ng-container *ngFor="let v of voltages">
|
<ng-container *ngFor="let v of voltages">
|
||||||
<div class="shortcut" [class.shortcutSelected]="values.voltage===v" (click)="values.voltage=v; update()">{{ v }}</div>
|
<div class="shortcut" [class.shortcutSelected]="values.voltage===v" (click)="values.voltage=v; update()">{{ v }}</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
|
||||||
<div class="value">
|
<tr>
|
||||||
<div class="label">Leistung</div>
|
<td class="label">Leistung</td>
|
||||||
<div class="input"><input type="number" [(ngModel)]="values.power" (ngModelChange)="update()"></div>
|
<td class="input"><input type="number" [(ngModel)]="values.power" (ngModelChange)="update()"></td>
|
||||||
<div class="unit">kW</div>
|
<td class="unit">kW</td>
|
||||||
<div class="shortcuts">
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="shortcuts">
|
||||||
<ng-container *ngFor="let c of powers">
|
<ng-container *ngFor="let c of powers">
|
||||||
<div class="shortcut" [class.shortcutSelected]="values.power===c" (click)="values.power=c; update()">{{ c }}</div>
|
<div class="shortcut" [class.shortcutSelected]="values.power===c" (click)="values.power=c; update()">{{ c }}</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
|
||||||
<div class="value">
|
<tr>
|
||||||
<div class="label">Querschnitt</div>
|
<td class="label">Querschnitt</td>
|
||||||
<div class="input"><input type="number" [(ngModel)]="values.crossSection" (ngModelChange)="update()"></div>
|
<td class="input"><input type="number" [(ngModel)]="values.crossSection" (ngModelChange)="update()"></td>
|
||||||
<div class="unit">mm²</div>
|
<td class="unit">mm²</td>
|
||||||
<div class="shortcuts">
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="shortcuts">
|
||||||
<ng-container *ngFor="let c of crossSections">
|
<ng-container *ngFor="let c of crossSections">
|
||||||
<div class="shortcut" [class.shortcutSelected]="values.crossSection===c" (click)="values.crossSection=c; update()">{{ c }}</div>
|
<div class="shortcut" [class.shortcutSelected]="values.crossSection===c" (click)="values.crossSection=c; update()">{{ c }}</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
|
||||||
<div class="value">
|
<tr>
|
||||||
<div class="label">Länge (1-fach)</div>
|
<td class="label">Länge (1-fach)</td>
|
||||||
<div class="input"><input type="number" [(ngModel)]="values.length" (ngModelChange)="update()"></div>
|
<td class="input"><input type="number" [(ngModel)]="values.length" (ngModelChange)="update()"></td>
|
||||||
<div class="unit">m</div>
|
<td class="unit">m</td>
|
||||||
<div class="shortcuts">
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="shortcuts">
|
||||||
<ng-container *ngFor="let l of lengths">
|
<ng-container *ngFor="let l of lengths">
|
||||||
<div class="shortcut" [class.shortcutSelected]="values.length===l" (click)="values.length=l; update()">{{ l }}</div>
|
<div class="shortcut" [class.shortcutSelected]="values.length===l" (click)="values.length=l; update()">{{ l }}</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
|
||||||
<div class="value">
|
<tr>
|
||||||
<div class="label">Spezifischer Widerstand</div>
|
<td class="label">Spezifischer Widerstand</td>
|
||||||
<div class="input"><input type="number" [(ngModel)]="values.resistanceSpecific" (ngModelChange)="update()"></div>
|
<td class="input"><input type="number" [(ngModel)]="values.resistanceSpecific" (ngModelChange)="update()"></td>
|
||||||
<div class="unit">Ω*m</div>
|
<td class="unit">Ω*m</td>
|
||||||
<div class="shortcuts">
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="shortcuts">
|
||||||
<ng-container *ngFor="let r of resistances">
|
<ng-container *ngFor="let r of resistances">
|
||||||
<div class="shortcut" [class.shortcutSelected]="values.resistanceSpecific===r.value" (click)="values.resistanceSpecific=r.value; update()">{{ r.name }}</div>
|
<div class="shortcut" [class.shortcutSelected]="values.resistanceSpecific===r.value" (click)="values.resistanceSpecific=r.value; update()">{{ r.name }}</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="box">
|
<div class="tile">
|
||||||
|
<div class="tileInner">
|
||||||
|
|
||||||
|
<div class="tileTitle">
|
||||||
|
Ergebnisse
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tileContent">
|
||||||
<app-value title="Spannungsverlust" unit="V" [value]="voltageDrop2Way" [places]="1" [percentDivisor]="values.voltage" [percentPlaces]="2" [percentMax]="0.03"></app-value>
|
<app-value title="Spannungsverlust" unit="V" [value]="voltageDrop2Way" [places]="1" [percentDivisor]="values.voltage" [percentPlaces]="2" [percentMax]="0.03"></app-value>
|
||||||
<app-value title="Verlustleistung" unit="W" [value]="powerLoss2Way" [places]="0"></app-value>
|
<app-value title="Verlustleistung" unit="W" [value]="powerLoss2Way" [places]="0"></app-value>
|
||||||
<app-value title="Verfügbare Spannung" unit="V" [value]="voltageDropLoad" [places]="1" [percentDivisor]="values.voltage" [percentPlaces]="2"></app-value>
|
<app-value title="Verfügbare Spannung" unit="V" [value]="voltageDropLoad" [places]="1" [percentDivisor]="values.voltage" [percentPlaces]="2"></app-value>
|
||||||
@ -66,3 +96,8 @@
|
|||||||
<app-value title="Lastwiderstand" unit="Ω" [value]="resistanceLoad" [places]="3"></app-value>
|
<app-value title="Lastwiderstand" unit="Ω" [value]="resistanceLoad" [places]="3"></app-value>
|
||||||
<app-value title="Gesamtwiderstand" unit="Ω" [value]="resistanceTotal" [places]="3"></app-value>
|
<app-value title="Gesamtwiderstand" unit="Ω" [value]="resistanceTotal" [places]="3"></app-value>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|||||||
@ -1,76 +1,28 @@
|
|||||||
@import "../../tile.less";
|
@import "../../tile.less";
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box {
|
|
||||||
border-top: 1px solid black;
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box:first-child {
|
|
||||||
border-top-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.value {
|
|
||||||
clear: both;
|
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
padding: 1vmin 0 0.5vmin 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
clear: both;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=number] {
|
|
||||||
float: left;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
input.tooHigh {
|
|
||||||
background-color: red;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.unit {
|
.unit {
|
||||||
padding-left: 0.5vmin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.shortcuts {
|
.shortcuts {
|
||||||
clear: both;
|
padding-top: calc(@space / 2);
|
||||||
|
padding-bottom: calc(@space * 2);
|
||||||
|
|
||||||
.shortcut {
|
.shortcut {
|
||||||
float: left;
|
float: left;
|
||||||
font-size: 90%;
|
font-size: 80%;
|
||||||
padding: 0.2vmin 0.7vmin;
|
padding: calc(@space / 2) @space;
|
||||||
margin: 0.5vmin;
|
margin-right: calc(@space / 2);
|
||||||
border-radius: 0.5vmin;
|
background-color: lightskyblue;
|
||||||
background-color: lightgray;
|
border-radius: @space;
|
||||||
}
|
|
||||||
|
|
||||||
.shortcutSelected {
|
|
||||||
background-color: lightgreen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 800px) {
|
|
||||||
.box {
|
|
||||||
float: left;
|
|
||||||
width: 50%;
|
|
||||||
border-top-width: 0;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user