From fc580799ab001f6a2446a204325009df0d78042a Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sat, 26 Jan 2019 03:07:07 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/TextPage/TextPage.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index 7b8ad501..89a864f4 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -96,7 +96,7 @@ class TextPage extends Vue { return `rgba(${r},${g},${b},${alpha})`; } - async calcDrawProps() { + calcDrawProps() { //preloaded fonts this.fontShifts = {//% ReaderDefault: 0, @@ -279,15 +279,13 @@ class TextPage extends Vue { this.$root.$emit('set-app-title', this.title); - const parsed = this.book.parsed; - this.parsed = parsed; + this.parsed = this.book.parsed; this.calcDrawProps(); await this.loadFonts(); - this.draw(); - this.refreshTime(); - + //this.draw(); + // шрифты хрен знает когда подгружаются, поэтому let i = 0; this.parsed.force = true; @@ -297,6 +295,8 @@ class TextPage extends Vue { i++; } this.parsed.force = false; + + this.refreshTime(); })(); } } @@ -315,6 +315,8 @@ class TextPage extends Vue { } draw() { + if (this.w < 10) + return; if (this.book && this.bookPos > 0 && this.bookPos >= this.parsed.textLength) { this.doEnd(); return;