Рефакторинг

This commit is contained in:
Book Pauk
2020-03-19 17:12:12 +07:00
parent 9f4c0479ce
commit b308dd58cc
3 changed files with 10 additions and 7 deletions

View File

@@ -67,9 +67,6 @@
@book-pos-changed="bookPosChanged"
@do-action="doAction"
@tool-bar-toggle="toolBarToggle"
@full-screen-toogle="fullScreenToggle"
@stop-scrolling="stopScrolling"
@scrolling-toggle="scrollingToggle"
@help-toggle="helpToggle"
@donate-toggle="donateToggle"

View File

@@ -504,7 +504,7 @@ class TextPage extends Vue {
async startTextScrolling() {
if (this.doingScrolling || !this.book || !this.parsed.textLength || !this.linesDown || this.pageLineCount < 1 ||
this.linesDown.length <= this.pageLineCount) {
this.$emit('stop-scrolling');
this.doStopScrolling();
return;
}
@@ -545,7 +545,7 @@ class TextPage extends Vue {
}
this.resolveTransition1Finish = null;
this.doingScrolling = false;
this.$emit('stop-scrolling');
this.doStopScrolling();
this.draw();
}
@@ -889,11 +889,15 @@ class TextPage extends Vue {
}
doScrollingToggle() {
this.$emit('scrolling-toggle');
this.$emit('do-action', {action: 'scrolling', event});
}
doFullScreenToggle() {
this.$emit('full-screen-toogle');
this.$emit('do-action', {action: 'fullScreen', event});
}
doStopScrolling() {
this.$emit('do-action', {action: 'stopScrolling', event});
}
async doFontSizeInc() {

View File

@@ -6,6 +6,7 @@ const readerActions = {
'redoAction': 'Действие вперед',
'fullScreen': 'На весь экран',
'scrolling': 'Плавный скроллинг',
'stopScrolling': '',
'setPosition': 'Установить позицию',
'search': 'Найти в тексте',
'copyText': 'Скопировать текст со страницы',
@@ -13,6 +14,7 @@ const readerActions = {
'offlineMode': 'Автономный режим (без интернета)',
'recentBooks': 'Открыть недавние',
'switchToolbar': 'Показать/скрыть панель управления',
'donate': '',
'bookBegin': 'В начало книги',
'bookEnd': 'В конец книги',
'pageBack': 'Страницу назад',