-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70cacc6
commit e40e37e
Showing
22 changed files
with
242 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
:host { | ||
--widget-background-color: var(--mdc-elevated-card-container-color); | ||
} |
2 changes: 1 addition & 1 deletion
2
...ntrol-scheme-view/src/lib/widgets/widgets-grid/control-scheme-widgets-grid.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './tilt-gauge-value.component'; |
44 changes: 44 additions & 0 deletions
44
modules/shared/ui/src/lib/tilt-gauge/tilt-gauge-value/tilt-gauge-value.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@if (value !== null) { | ||
<svg xmlns="http://www.w3.org/2000/svg" | ||
preserveAspectRatio="xMidYMid meet" | ||
[attr.viewBox]="viewBox" | ||
> | ||
@if (clickable) { | ||
<rect x="34%" | ||
y="80%" | ||
width="32%" | ||
height="19%" | ||
class="box box_clickable" | ||
(click)="onClick($event)" | ||
(keydown.enter)="onClick($event)" | ||
(keydown.space)="onClick($event)" | ||
[matTooltip]="'controlScheme.widgets.tiltCommon.compensateButtonTitle' | transloco" | ||
role="button" | ||
focusable="true" | ||
tabindex="0" | ||
rx="3" | ||
></rect> | ||
<text x="50%" | ||
y="91%" | ||
class="value value_clickable" | ||
> | ||
{{ value }} | ||
</text> | ||
} @else { | ||
<rect x="34%" | ||
y="80%" | ||
width="32%" | ||
height="19%" | ||
class="box" | ||
rx="3" | ||
></rect> | ||
<text x="50%" | ||
y="91%" | ||
class="value" | ||
> | ||
{{ value }} | ||
</text> | ||
} | ||
|
||
</svg> | ||
} |
21 changes: 21 additions & 0 deletions
21
modules/shared/ui/src/lib/tilt-gauge/tilt-gauge-value/tilt-gauge-value.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.value { | ||
dominant-baseline: middle; | ||
font-size: 0.9em; | ||
text-anchor: middle; | ||
fill: var(--app-text-color); | ||
|
||
&_clickable { | ||
pointer-events: none; | ||
} | ||
} | ||
|
||
.box { | ||
fill: var(--widget-background-color, var(--app-background-color)); | ||
stroke: var(--app-primary-color); | ||
stroke-width: 2; | ||
|
||
&_clickable { | ||
cursor: pointer; | ||
user-select: none; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
modules/shared/ui/src/lib/tilt-gauge/tilt-gauge-value/tilt-gauge-value.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; | ||
import { TranslocoPipe } from '@ngneat/transloco'; | ||
import { MatTooltip } from '@angular/material/tooltip'; | ||
|
||
@Component({ | ||
standalone: true, | ||
// eslint-disable-next-line @angular-eslint/component-selector | ||
selector: 'g[appTiltGaugeValue]', | ||
templateUrl: './tilt-gauge-value.component.html', | ||
styleUrls: [ './tilt-gauge-value.component.scss' ], | ||
imports: [ | ||
TranslocoPipe, | ||
MatTooltip | ||
], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class TiltGaugeValueComponent { | ||
@Input() public viewBox = '0 0 0 0'; | ||
|
||
@Input() public clickable = false; | ||
|
||
@Input('appTiltGaugeValue') public value: number | null = null; | ||
|
||
@Output() public readonly clicked = new EventEmitter<Event>(); | ||
|
||
public onClick( | ||
event: Event | ||
): void { | ||
if (this.clickable) { | ||
this.clicked.emit(event); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
modules/widgets/src/lib/common/common-tilt-widgets-styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.widget-gauge { | ||
display: block; | ||
height: 100%; | ||
position: relative; | ||
overflow: hidden; | ||
grid-row: span 3; | ||
} | ||
|
||
.widget-icon { | ||
fill: none; | ||
stroke: var(--app-text-color); | ||
stroke-linecap: round; | ||
|
||
&__outline { | ||
stroke-width: 2; | ||
} | ||
|
||
&__inline { | ||
stroke-width: 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 0 additions & 47 deletions
47
modules/widgets/src/lib/pitch/pitch-sensor-widget.component.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.