Skip to content

Commit ed8e051

Browse files
committed
rev: clean
1 parent 4d247f2 commit ed8e051

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

client/src/app/_models/hmi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ export enum GaugeEventActionType {
339339
}
340340

341341
export enum GaugeEventRelativeFromType {
342-
window = 'shapes.event-relativefrom-window',
343-
mouse = 'shapes.event-relativefrom-mouse'
342+
window = 'window',
343+
mouse = 'mouse'
344344
}
345345

346346
export enum GaugeEventSetValueType {

client/src/app/fuxa-view/fuxa-view.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,9 @@ export class FuxaViewComponent implements OnInit, AfterViewInit, OnDestroy {
721721
}
722722
card = new CardModel(id);
723723

724-
if (options.relativeFrom && options.relativeFrom == Utils.getEnumKey(GaugeEventRelativeFromType, GaugeEventRelativeFromType.window)) {
725-
card.x = (Utils.isNumeric(options.left) ? parseInt(options.left) : 0);
726-
card.y = (Utils.isNumeric(options.top) ? parseInt(options.top) : 0);
724+
if (options.relativeFrom && options.relativeFrom == GaugeEventRelativeFromType.window) {
725+
card.x = Utils.isNumeric(options.left) ? parseInt(options.left) : 0;
726+
card.y = Utils.isNumeric(options.top) ? parseInt(options.top) : 0;
727727
} else {
728728
card.x = event.clientX + (Utils.isNumeric(options.left) ? parseInt(options.left) : 0);
729729
card.y = event.clientY + (Utils.isNumeric(options.top) ? parseInt(options.top) : 0);

client/src/app/gauges/gauge-property/flex-event/flex-event.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<mat-select [(value)]="item.actparam">
4343
<mat-option *ngFor="let v of views; index as i" [value]="v.id">{{v.name}}</mat-option>
4444
</mat-select>
45-
</div>
45+
</div>
4646
</ng-container>
4747
<ng-template #destination>
4848
<div class="my-form-field lbk" style="width: 200px;">
@@ -61,15 +61,15 @@
6161
<span>{{'general-y' | translate}}</span>
6262
<input numberOnly [(ngModel)]="item.actoptions.top" type="number" style="width: 60px">
6363
</div>
64-
<div *ngIf="cardDestination === item.action" class="my-form-field lbk ml10 tac" style="max-width: 70px;margin-top: 5px">
64+
<div *ngIf="cardDestination === item.action" class="my-form-field lbk ml10 mt5 tac" style="max-width: 70px">
6565
<span>{{'gauges.property-event-single-card' | translate}}</span>
6666
<mat-slide-toggle color="primary" [(ngModel)]="item.actoptions.singleCard"></mat-slide-toggle>
6767
</div>
68-
<div class="my-form-field lbk" style="width: 240px;margin-top: 5px">
68+
<div class="my-form-field lbk mt5" style="width: 240px">
6969
<span>{{'gauges.property-event-destination-relative-from' | translate}}</span>
7070
<mat-select [(value)]="item.actoptions.relativeFrom">
7171
<mat-option *ngFor="let rf of relativeFromType | enumToArray" [value]="rf.key">
72-
{{ rf.value }}
72+
{{ 'shapes.event-relativefrom-' + rf.value | translate }}
7373
</mat-option>
7474
</mat-select>
7575
</div>
@@ -158,9 +158,9 @@
158158
<input [(ngModel)]="scriptParam.value" type="text" style="width: 260px">
159159
</ng-container>
160160
<ng-template #enterParamValue>
161-
<input [(ngModel)]="scriptParam.value"
162-
placeholder="{{'gauges.property-event-script-param-input-value' | translate}}"
163-
type="text"
161+
<input [(ngModel)]="scriptParam.value"
162+
placeholder="{{'gauges.property-event-script-param-input-value' | translate}}"
163+
type="text"
164164
style="width: 260px">
165165
</ng-template>
166166
</div>

client/src/app/gauges/gauge-property/flex-event/flex-event.component.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ export class FlexEventComponent implements OnInit {
6464
this.viewPanels = <PanelData[]>Object.values(this.data.view?.items ?? [])?.filter((item: any) => item.type === 'svg-ext-own_ctrl-panel');//#issue on build PanelComponent.TypeTag);
6565
this.enterActionType[Utils.getEnumKey(GaugeEventActionType, GaugeEventActionType.onRunScript)] = this.translateService.instant(GaugeEventActionType.onRunScript);
6666

67-
Object.keys(this.relativeFromType).forEach(key => {
68-
console.log(this.relativeFromType[key]);
69-
this.translateService.get(this.relativeFromType[key]).subscribe((txt: string) => { this.relativeFromType[key] = txt; });
70-
});
71-
7267
Object.keys(this.actionType).forEach(key => {
7368
this.translateService.get(this.actionType[key]).subscribe((txt: string) => { this.actionType[key] = txt; });
7469
});

0 commit comments

Comments
 (0)