From da3c7a02f0979155aa0191276522fe0a59c6caa0 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sat, 27 Apr 2019 18:34:23 +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?= =?UTF-8?q?=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8=20?= =?UTF-8?q?=D1=88=D1=80=D0=B8=D1=84=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/TextPage/TextPage.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index b129b89c..8ca86a0b 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -204,13 +204,17 @@ class TextPage extends Vue { this.drawHelper.context = this.context; //сообщение "Загрузка шрифтов..." - const flText = 'Загрузка шрифта...'; - this.$refs.fontsLoading.innerHTML = flText; - const fontsLoadingStyle = this.$refs.fontsLoading.style; - fontsLoadingStyle.position = 'absolute'; - fontsLoadingStyle.fontSize = this.fontSize + 'px'; - fontsLoadingStyle.top = (this.realHeight/2 - 2*this.fontSize) + 'px'; - fontsLoadingStyle.left = (this.realWidth - this.drawHelper.measureText(flText, {}))/2 + 'px'; + this.$refs.fontsLoading.innerHTML = ''; + (async() => { + await sleep(500); + const flText = 'Загрузка шрифта'; + this.$refs.fontsLoading.innerHTML = flText + '  '; + const fontsLoadingStyle = this.$refs.fontsLoading.style; + fontsLoadingStyle.position = 'absolute'; + fontsLoadingStyle.fontSize = this.fontSize + 'px'; + fontsLoadingStyle.top = (this.realHeight/2 - 2*this.fontSize) + 'px'; + fontsLoadingStyle.left = (this.realWidth - this.drawHelper.measureText(flText, {}))/2 + 'px'; + })(); //parsed if (this.parsed) {