Небольшие поправки отображения загрузки шрифта
This commit is contained in:
@@ -204,13 +204,17 @@ class TextPage extends Vue {
|
|||||||
this.drawHelper.context = this.context;
|
this.drawHelper.context = this.context;
|
||||||
|
|
||||||
//сообщение "Загрузка шрифтов..."
|
//сообщение "Загрузка шрифтов..."
|
||||||
const flText = 'Загрузка шрифта...';
|
this.$refs.fontsLoading.innerHTML = '';
|
||||||
this.$refs.fontsLoading.innerHTML = flText;
|
(async() => {
|
||||||
const fontsLoadingStyle = this.$refs.fontsLoading.style;
|
await sleep(500);
|
||||||
fontsLoadingStyle.position = 'absolute';
|
const flText = 'Загрузка шрифта';
|
||||||
fontsLoadingStyle.fontSize = this.fontSize + 'px';
|
this.$refs.fontsLoading.innerHTML = flText + ' <i class="el-icon-loading"></i>';
|
||||||
fontsLoadingStyle.top = (this.realHeight/2 - 2*this.fontSize) + 'px';
|
const fontsLoadingStyle = this.$refs.fontsLoading.style;
|
||||||
fontsLoadingStyle.left = (this.realWidth - this.drawHelper.measureText(flText, {}))/2 + 'px';
|
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
|
//parsed
|
||||||
if (this.parsed) {
|
if (this.parsed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user