Skip to content

Commit ecdae64

Browse files
author
Salma Alam-Naylor
committed
Clean up files for new fretonator sub components
1 parent ee7a152 commit ecdae64

File tree

4 files changed

+14
-30
lines changed

4 files changed

+14
-30
lines changed
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
import { Component, Input, OnInit } from '@angular/core';
1+
import { Component, Input } from '@angular/core';
22
import { ChordMap } from '../../../util/types';
33

44
@Component({
55
selector: 'app-chord-map',
66
templateUrl: './chord-map.component.html',
77
styleUrls: ['./chord-map.component.scss']
88
})
9-
export class ChordMapComponent implements OnInit {
9+
export class ChordMapComponent {
1010
@Input() chordMap: ChordMap;
11-
12-
constructor() { }
13-
14-
ngOnInit(): void {
15-
}
16-
1711
}
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
import { Component, Input, OnInit } from '@angular/core';
1+
import { Component, Input } from '@angular/core';
22

33
@Component({
44
selector: 'app-interval-map',
55
templateUrl: './interval-map.component.html',
66
styleUrls: ['./interval-map.component.scss']
77
})
8-
export class IntervalMapComponent implements OnInit {
8+
export class IntervalMapComponent {
99
@Input() intervalMap: [];
10-
constructor() { }
11-
12-
ngOnInit(): void {
13-
}
14-
1510
}

apps/fretonator-web/src/app/common/fretonator/scale-map/scale-map.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ <h4 class="scaleMap__title">Degrees</h4>
1414
aria-controls="scaleMapInfo"
1515
role="switch"
1616
type="button"
17-
[attr.aria-checked]="showscaleMapInfo"
18-
(click)="togglescaleMapInfo()">{{scaleDegreesToggleText}}
17+
[attr.aria-checked]="showScaleMapInfo"
18+
(click)="toggleScaleMapInfo()">{{scaleDegreesToggleText}}
1919
</button>
2020
</div>
2121

@@ -34,14 +34,14 @@ <h5 class="scaleDisplay__note">
3434

3535
<div class="scaleMapInfo"
3636
id="scaleMapInfo"
37-
*ngIf="showscaleMapInfo">
37+
*ngIf="showScaleMapInfo">
3838
<h2 class="scaleMapInfo__title">About Scale Degrees
3939
<button class="scaleMapInfo__close"
4040
aria-label="Scale Degrees Info Toggle"
4141
aria-controls="scaleMapInfo"
4242
role="switch"
4343
type="button"
44-
(click)="togglescaleMapInfo()">
44+
(click)="toggleScaleMapInfo()">
4545
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
4646
<path fill="#474350" fill-rule="evenodd"
4747
d="M14 1.41L12.59 0 7 5.59 1.41 0 0 1.41 5.59 7 0 12.59 1.41 14 7 8.41 12.59 14 14 12.59 8.41 7z"></path>
Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Input, OnInit } from '@angular/core';
1+
import { Component, Input } from '@angular/core';
22
import { Mode, Scale } from '../../../util/types';
33

44
enum ScaleDegreesToggleText {
@@ -11,20 +11,15 @@ enum ScaleDegreesToggleText {
1111
templateUrl: './scale-map.component.html',
1212
styleUrls: ['./scale-map.component.scss']
1313
})
14-
export class ScaleMapComponent implements OnInit {
14+
export class ScaleMapComponent {
1515
@Input() mode: Mode;
1616
@Input() scale: Scale;
1717

18-
showscaleMapInfo = false;
18+
showScaleMapInfo = false;
1919
scaleDegreesToggleText = ScaleDegreesToggleText.hidden;
2020

21-
constructor() { }
22-
23-
ngOnInit(): void {
24-
}
25-
26-
togglescaleMapInfo() {
27-
this.showscaleMapInfo = !this.showscaleMapInfo;
28-
this.scaleDegreesToggleText = this.showscaleMapInfo ? ScaleDegreesToggleText.visible : ScaleDegreesToggleText.hidden;
21+
toggleScaleMapInfo() {
22+
this.showScaleMapInfo = !this.showScaleMapInfo;
23+
this.scaleDegreesToggleText = this.showScaleMapInfo ? ScaleDegreesToggleText.visible : ScaleDegreesToggleText.hidden;
2924
}
3025
}

0 commit comments

Comments
 (0)