From 55200dc742b27df87eb8a87e757ce6e2f5c146bf Mon Sep 17 00:00:00 2001 From: smuddyx Date: Sat, 13 Jun 2020 18:07:09 +0200 Subject: [PATCH] fix text render flickering --- src/app/modules/songs/services/text-rendering.service.ts | 2 -- .../components/song-text/song-text.component.ts | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/modules/songs/services/text-rendering.service.ts b/src/app/modules/songs/services/text-rendering.service.ts index 3574fb4..648013d 100644 --- a/src/app/modules/songs/services/text-rendering.service.ts +++ b/src/app/modules/songs/services/text-rendering.service.ts @@ -107,8 +107,6 @@ export class TextRenderingService { const chordCount = chords.reduce((acc: number, cur: Chord) => acc + cur.length, 0); const lineCount = chordLine.replace(/\s/g, "").length; - console.log(chordCount + ' - ' + lineCount + ' - ' + chordLine); - console.log(chords); const isChrod = chordCount * 2 > lineCount; return isChrod ? chords : []; } diff --git a/src/app/widget-modules/components/song-text/song-text.component.ts b/src/app/widget-modules/components/song-text/song-text.component.ts index de46801..0637bd4 100644 --- a/src/app/widget-modules/components/song-text/song-text.component.ts +++ b/src/app/widget-modules/components/song-text/song-text.component.ts @@ -43,8 +43,10 @@ export class SongTextComponent implements OnInit { public set text(value: string) { this.sections = null; this.offset = 0; - setTimeout(() => - this.sections = this.textRenderingService.parse(value, this.transpose).sort((a, b) => a.type - b.type), 100); + if (this.fullscreen) + setTimeout(() => + this.sections = this.textRenderingService.parse(value, this.transpose).sort((a, b) => a.type - b.type), 100); + else this.sections = this.textRenderingService.parse(value, this.transpose).sort((a, b) => a.type - b.type) }