publish show
This commit is contained in:
@@ -17,19 +17,21 @@ export type ChordMode = 'show' | 'hide' | 'onlyFirst'
|
||||
})
|
||||
export class SongTextComponent implements OnInit {
|
||||
public sections: Section[];
|
||||
public _chordMode: ChordMode = 'hide';
|
||||
@Input() public scrollIndex = 0;
|
||||
@Input() showSwitch = false;
|
||||
@Input()
|
||||
public set chordMode(value: ChordMode) {
|
||||
this._chordMode = value ?? 'hide';
|
||||
}
|
||||
|
||||
@Output() public chordModeChanged = new EventEmitter<ChordMode>();
|
||||
public faLines = faGripLines;
|
||||
|
||||
constructor(private textRenderingService: TextRenderingService, private elRef: ElementRef) {
|
||||
}
|
||||
|
||||
public _chordMode: ChordMode = 'hide';
|
||||
|
||||
@Input()
|
||||
public set chordMode(value: ChordMode) {
|
||||
this._chordMode = value ?? 'hide';
|
||||
}
|
||||
|
||||
@Input()
|
||||
public set text(value: string) {
|
||||
this.sections = this.textRenderingService.parse(value).sort((a, b) => a.type - b.type);
|
||||
@@ -61,6 +63,10 @@ export class SongTextComponent implements OnInit {
|
||||
this.chordModeChanged.emit(next);
|
||||
}
|
||||
|
||||
public onClick() {
|
||||
scrollTo(0, this.elRef.nativeElement.offsetTop - 20);
|
||||
}
|
||||
|
||||
private getNextChordMode(): ChordMode {
|
||||
switch (this._chordMode) {
|
||||
case 'show':
|
||||
@@ -71,8 +77,4 @@ export class SongTextComponent implements OnInit {
|
||||
return 'show';
|
||||
}
|
||||
}
|
||||
|
||||
public onClick() {
|
||||
scrollTo(0, this.elRef.nativeElement.offsetTop - 20);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user