-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust anchor position (closes #129)
- Loading branch information
Showing
17 changed files
with
227 additions
and
62 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
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
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
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
103 changes: 103 additions & 0 deletions
103
src/app/modules/alarms/components/nsew-buttons.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,103 @@ | ||
/*********************************** | ||
NSEW arrow buttons component | ||
<nsew-buttons> | ||
***********************************/ | ||
import { | ||
Component, | ||
Input, | ||
Output, | ||
ChangeDetectionStrategy, | ||
ChangeDetectorRef, | ||
EventEmitter | ||
} from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { MatButtonModule } from '@angular/material/button'; | ||
import { MatIconModule } from '@angular/material/icon'; | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'nsew-buttons', | ||
imports: [CommonModule, MatButtonModule, MatIconModule], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
styles: [ | ||
` | ||
.nsew { | ||
border: silver 0px solid; | ||
} | ||
.nsew .btnRow { | ||
display: flex; | ||
flex-wrap: no-wrap; | ||
} | ||
.nsew .btnDiv { | ||
width: 50px; | ||
} | ||
` | ||
], | ||
template: ` | ||
<div class="nsew"> | ||
<div class="btnRow"> | ||
<div class="btnDiv"></div> | ||
<div class="btnDiv"> | ||
<button | ||
mat-mini-fab | ||
color="primary" | ||
[disabled]="disabled" | ||
(click)="action(0)" | ||
> | ||
<mat-icon>arrow_upward</mat-icon> | ||
</button> | ||
</div> | ||
<div class="btnDiv"></div> | ||
</div> | ||
<div class="btnRow"> | ||
<div class="btnDiv"> | ||
<button | ||
mat-mini-fab | ||
color="primary" | ||
[disabled]="disabled" | ||
(click)="action(270)" | ||
> | ||
<mat-icon>arrow_back</mat-icon> | ||
</button> | ||
</div> | ||
<div class="btnDiv"></div> | ||
<div class="btnDiv"> | ||
<button | ||
mat-mini-fab | ||
color="primary" | ||
[disabled]="disabled" | ||
(click)="action(90)" | ||
> | ||
<mat-icon>arrow_forward</mat-icon> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="btnRow"> | ||
<div class="btnDiv"></div> | ||
<div class="btnDiv"> | ||
<button | ||
mat-mini-fab | ||
color="primary" | ||
[disabled]="disabled" | ||
(click)="action(180)" | ||
> | ||
<mat-icon>arrow_downward</mat-icon> | ||
</button> | ||
</div> | ||
<div class="btnDiv"></div> | ||
</div> | ||
</div> | ||
` | ||
}) | ||
export class NSEWButtonsComponent { | ||
@Input() disabled: boolean; | ||
@Output() direction: EventEmitter<number> = new EventEmitter(); | ||
|
||
constructor(private cdr: ChangeDetectorRef) {} | ||
|
||
action(value: number) { | ||
this.direction.emit(value); | ||
} | ||
} |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.