2 |
3 |
4 | {{showTime(time)}}
5 |
6 |
7 |
8 |
11 |
14 |
17 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/app/tap-input/display/tap-display.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | import { showTime } from '../../time/audio-player-controls/audio-player-controls.component';
4 | import { TapInputService, TapInputTime } from '../tap-input.service';
5 |
6 | @Component({
7 | selector: 'app-tap-display',
8 | templateUrl: './tap-display.component.html',
9 | styleUrls: ['./tap-display.component.css'],
10 | })
11 | export class TapDisplayComponent {
12 |
13 | times: TapInputTime[];
14 |
15 | constructor(private service: TapInputService) {
16 | this.service.times.subscribe((times) => {
17 | this.times = times;
18 | });
19 | }
20 |
21 | captureScroll(event: Event): void {
22 | event.stopPropagation();
23 | }
24 |
25 | showTime(time: TapInputTime): string {
26 | return showTime(time.time);
27 | }
28 |
29 | selectAll(): void {
30 | this.service.selectAll();
31 | }
32 |
33 | deselectAll(): void {
34 | this.service.deselectAll();
35 | }
36 |
37 | createNotes(): void {
38 | this.service.createNotes();
39 | }
40 |
41 | deleteTimes(): void {
42 | this.service.deleteTimes();
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/app/tap-input/input/tap-input.component.css:
--------------------------------------------------------------------------------
1 |
2 | .tap-input {
3 | width: 100%;
4 | height: 100%;
5 | display: flex;
6 | }
7 |
8 | .tap-input mat-list {
9 | flex: 1;
10 | }
11 |
12 | .tap-input mat-form-field {
13 | width: 98%;
14 | margin-left: 1%;
15 | margin-right: 1%;
16 | }
17 |
18 | .tap-input button {
19 | margin-top: 1em;
20 | margin-right: calc(1.5% + 0.75em);
21 | }
22 |
--------------------------------------------------------------------------------
/src/app/tap-input/input/tap-input.component.html:
--------------------------------------------------------------------------------
1 |