Попытка сделать автоскроллинг текста
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
@book-pos-changed="bookPosChanged"
|
||||
@tool-bar-toggle="toolBarToggle"
|
||||
@full-screen-toogle="fullScreenToggle"
|
||||
@scrolling-toggle="scrollingToggle"
|
||||
></component>
|
||||
</keep-alive>
|
||||
|
||||
@@ -249,6 +250,8 @@ class Reader extends Vue {
|
||||
this.setPositionActive = false;
|
||||
this.historyActive = false;
|
||||
this.settingsActive = false;
|
||||
if (this.scrollingActive)
|
||||
this.scrollingToggle();
|
||||
}
|
||||
|
||||
loaderToggle() {
|
||||
@@ -273,6 +276,18 @@ class Reader extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
scrollingToggle() {
|
||||
this.scrollingActive = !this.scrollingActive;
|
||||
if (this.activePage == 'TextPage') {
|
||||
const page = this.$refs.page;
|
||||
if (this.scrollingActive) {
|
||||
page.startTextScrolling();
|
||||
} else {
|
||||
page.stopTextScrolling();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
historyToggle() {
|
||||
this.historyActive = !this.historyActive;
|
||||
if (this.historyActive) {
|
||||
@@ -303,7 +318,10 @@ class Reader extends Vue {
|
||||
break;
|
||||
case 'setPosition':
|
||||
this.setPositionToggle();
|
||||
break;
|
||||
break;
|
||||
case 'scrolling':
|
||||
this.scrollingToggle()
|
||||
break;
|
||||
case 'history':
|
||||
this.historyToggle();
|
||||
break;
|
||||
@@ -536,6 +554,9 @@ class Reader extends Vue {
|
||||
case 'KeyP':
|
||||
this.setPositionToggle();
|
||||
break;
|
||||
case 'KeyZ':
|
||||
this.scrollingToggle();
|
||||
break;
|
||||
case 'KeyH':
|
||||
this.historyToggle();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user