Доделки скроллинга
This commit is contained in:
@@ -53,7 +53,7 @@
|
|||||||
@book-pos-changed="bookPosChanged"
|
@book-pos-changed="bookPosChanged"
|
||||||
@tool-bar-toggle="toolBarToggle"
|
@tool-bar-toggle="toolBarToggle"
|
||||||
@full-screen-toogle="fullScreenToggle"
|
@full-screen-toogle="fullScreenToggle"
|
||||||
@scrolling-toggle="scrollingToggle"
|
@stop-scrolling="stopScrolling"
|
||||||
></component>
|
></component>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
|
|
||||||
@@ -250,8 +250,7 @@ class Reader extends Vue {
|
|||||||
this.setPositionActive = false;
|
this.setPositionActive = false;
|
||||||
this.historyActive = false;
|
this.historyActive = false;
|
||||||
this.settingsActive = false;
|
this.settingsActive = false;
|
||||||
if (this.scrollingActive)
|
this.stopScrolling();
|
||||||
this.scrollingToggle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loaderToggle() {
|
loaderToggle() {
|
||||||
@@ -276,6 +275,11 @@ class Reader extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stopScrolling() {
|
||||||
|
if (this.scrollingActive)
|
||||||
|
this.scrollingToggle();
|
||||||
|
}
|
||||||
|
|
||||||
scrollingToggle() {
|
scrollingToggle() {
|
||||||
this.scrollingActive = !this.scrollingActive;
|
this.scrollingActive = !this.scrollingActive;
|
||||||
if (this.activePage == 'TextPage') {
|
if (this.activePage == 'TextPage') {
|
||||||
|
|||||||
@@ -367,7 +367,6 @@ class TextPage extends Vue {
|
|||||||
this.page1 = null;
|
this.page1 = null;
|
||||||
this.page2 = null;
|
this.page2 = null;
|
||||||
this.statusBar = null;
|
this.statusBar = null;
|
||||||
await this.stopTextScrolling();
|
|
||||||
|
|
||||||
this.calcDrawProps();
|
this.calcDrawProps();
|
||||||
this.setBackground();
|
this.setBackground();
|
||||||
@@ -394,7 +393,7 @@ class TextPage extends Vue {
|
|||||||
async startTextScrolling() {
|
async startTextScrolling() {
|
||||||
if (this.doingScrolling || !this.book || !this.parsed.textLength || !this.linesDown || this.pageLineCount < 1 ||
|
if (this.doingScrolling || !this.book || !this.parsed.textLength || !this.linesDown || this.pageLineCount < 1 ||
|
||||||
this.linesDown.length <= this.pageLineCount) {
|
this.linesDown.length <= this.pageLineCount) {
|
||||||
this.$emit('scrolling-toggle');
|
this.$emit('stop-scrolling');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,7 +426,6 @@ class TextPage extends Vue {
|
|||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
this.doDown();
|
this.doDown();
|
||||||
if (this.linesDown.length <= this.pageLineCount + 1) {
|
if (this.linesDown.length <= this.pageLineCount + 1) {
|
||||||
this.$emit('scrolling-toggle');
|
|
||||||
this.stopScrolling = true;
|
this.stopScrolling = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -439,6 +437,7 @@ class TextPage extends Vue {
|
|||||||
}
|
}
|
||||||
this.resolveTransitionFinish = null;
|
this.resolveTransitionFinish = null;
|
||||||
this.doingScrolling = false;
|
this.doingScrolling = false;
|
||||||
|
this.$emit('stop-scrolling');
|
||||||
}
|
}
|
||||||
|
|
||||||
async stopTextScrolling() {
|
async stopTextScrolling() {
|
||||||
|
|||||||
Reference in New Issue
Block a user