Рефакторинг
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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': 'Страницу назад',
|
||||
|
||||
Reference in New Issue
Block a user