Skip to content

Commit d6f7e79

Browse files
author
Salma Alam-Naylor
committed
1. Add scrollTarget behaviour to theoretical switch button
2. Change colour of youtube video loader bg
1 parent 9e00d83 commit d6f7e79

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h2 class="infoBlock__title">About Theoretical Scales
6565
of {{modeMap[0].displayName | getEnharmonicEquivalent }} to make
6666
the notes easier to read. (It'll sound exactly the same!)</p>
6767
<a class="actionButton"
68-
(click)="toggleTheoreticalScaleInfo()"
68+
(click)="linkClick()"
6969
[routerLink]="note | getEnharmonicRouterLink: noteExtenderString: mode"
7070
>Switch to {{modeMap[0].displayName | getEnharmonicEquivalent }}</a>
7171

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Component, Input } from '@angular/core';
22
import { Mode, ModeMap } from '../../../util/types';
33
import { NotePlaybackService } from '../../playback/note-playback.service';
4+
import { GlobalService } from '../../../global.service';
45

56
enum ScaleDegreesToggleText {
67
hidden = 'What is this?',
@@ -30,7 +31,8 @@ export class ScaleMapComponent {
3031
scaleDegreesToggleText = ScaleDegreesToggleText.hidden;
3132
theoreticalScalesToggleText = TheoreticalScalesToggleText.hidden;
3233

33-
constructor(public playbackService: NotePlaybackService) {
34+
constructor(public playbackService: NotePlaybackService,
35+
private globalService: GlobalService) {
3436
}
3537

3638
toggleScaleMapInfo() {
@@ -43,6 +45,11 @@ export class ScaleMapComponent {
4345
this.theoreticalScalesToggleText = this.showTheoreticalScalesInfo ? TheoreticalScalesToggleText.visible : TheoreticalScalesToggleText.hidden;
4446
}
4547

48+
linkClick() {
49+
this.toggleTheoreticalScaleInfo();
50+
this.globalService.getScrollTarget().scrollIntoView();
51+
}
52+
4653
playScale(modeMap: ModeMap) {
4754
this.playbackService.playMode(modeMap);
4855
}

apps/fretonator-web/src/app/common/video-loader/video-loader.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
height: 0;
3535
padding-bottom: percentage(9/16);
3636
overflow: hidden;
37-
background-color: var(--purple);
37+
background-color: var(--black);
3838
position: relative;
3939
}
4040

apps/fretonator-web/src/app/common/video-loader/video-server/video-server.component.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
.videoServer__title {
1313
@include font_large;
14+
color: var(--offwhite);
1415
margin-bottom: pxToRem($grid-unit * 4);
1516
}
1617

1718
.videoServer__link {
18-
color: var(--black);
19+
color: var(--offwhite);
1920
font-size: pxToRem(26);
2021
}
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
import { Component, Input, OnInit } from '@angular/core';
1+
import { Component, Input } from '@angular/core';
22

33
@Component({
44
selector: 'app-video-server',
55
templateUrl: './video-server.component.html',
66
styleUrls: ['./video-server.component.scss']
77
})
8-
export class VideoServerComponent implements OnInit {
8+
export class VideoServerComponent {
99
@Input() youTubeId: string;
10-
11-
constructor() {
12-
}
13-
14-
ngOnInit(): void {
15-
}
16-
1710
}

0 commit comments

Comments
 (0)