Доработки двухстраничного режима

This commit is contained in:
Book Pauk
2021-02-04 20:34:25 +07:00
parent cfc946ad12
commit 52f9131f99
4 changed files with 17 additions and 5 deletions

View File

@@ -194,6 +194,10 @@ export default @Component({
} }
})(); })();
}, },
dualPageMode(newValue) {
if (newValue)
this.stopScrolling();
},
}, },
}) })
class Reader extends Vue { class Reader extends Vue {
@@ -227,6 +231,7 @@ class Reader extends Vue {
whatsNewVisible = false; whatsNewVisible = false;
whatsNewContent = ''; whatsNewContent = '';
donationVisible = false; donationVisible = false;
dualPageMode = false;
created() { created() {
this.rstore = rstore; this.rstore = rstore;
@@ -321,6 +326,7 @@ class Reader extends Vue {
this.djvuQuality = settings.djvuQuality; this.djvuQuality = settings.djvuQuality;
this.pdfAsText = settings.pdfAsText; this.pdfAsText = settings.pdfAsText;
this.pdfQuality = settings.pdfQuality; this.pdfQuality = settings.pdfQuality;
this.dualPageMode = settings.dualPageMode;
this.readerActionByKeyCode = utils.userHotKeysObjectSwap(settings.userHotKeys); this.readerActionByKeyCode = utils.userHotKeysObjectSwap(settings.userHotKeys);
this.$root.readerActionByKeyEvent = (event) => { this.$root.readerActionByKeyEvent = (event) => {
@@ -778,7 +784,6 @@ class Reader extends Vue {
case 'loader': case 'loader':
case 'fullScreen': case 'fullScreen':
case 'setPosition': case 'setPosition':
case 'scrolling':
case 'search': case 'search':
case 'copyText': case 'copyText':
case 'convOptions': case 'convOptions':
@@ -794,6 +799,13 @@ class Reader extends Vue {
classResult = classActive; classResult = classActive;
} }
break; break;
case 'scrolling':
if (this.progressActive || this.dualPageMode) {
classResult = classDisabled;
} else if (this[`${action}Active`]) {
classResult = classActive;
}
break;
case 'undoAction': case 'undoAction':
if (this.actionCur <= 0) if (this.actionCur <= 0)
classResult = classDisabled; classResult = classDisabled;

View File

@@ -69,7 +69,7 @@
</div> </div>
<div class="item row"> <div class="item row">
<div class="label-2">Заполнение (px)</div> <div class="label-2">Заполнение</div>
<div class="col row"> <div class="col row">
<NumInput class="col-left" v-model="dualDivStrokeFill" :min="0" :max="2000"> <NumInput class="col-left" v-model="dualDivStrokeFill" :min="0" :max="2000">
<q-tooltip :delay="1000" anchor="top middle" self="bottom middle" content-style="font-size: 80%"> <q-tooltip :delay="1000" anchor="top middle" self="bottom middle" content-style="font-size: 80%">
@@ -80,7 +80,7 @@
</div> </div>
<div class="item row"> <div class="item row">
<div class="label-2">Промежуток (px)</div> <div class="label-2">Промежуток</div>
<div class="col row"> <div class="col row">
<NumInput class="col-left" v-model="dualDivStrokeGap" :min="0" :max="2000"> <NumInput class="col-left" v-model="dualDivStrokeGap" :min="0" :max="2000">
<q-tooltip :delay="1000" anchor="top middle" self="bottom middle" content-style="font-size: 80%"> <q-tooltip :delay="1000" anchor="top middle" self="bottom middle" content-style="font-size: 80%">

View File

@@ -317,7 +317,7 @@ export default class DrawHelper {
} }
async doPageAnimationRightShift(page1, page2, duration, isDown, animation1Finish) { async doPageAnimationRightShift(page1, page2, duration, isDown, animation1Finish) {
const s = this.w + this.fontSize; const s = this.boxW + this.fontSize;
if (isDown) { if (isDown) {
page1.style.transform = `translateX(${s}px)`; page1.style.transform = `translateX(${s}px)`;

View File

@@ -519,7 +519,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.dualPageMode) {
this.doStopScrolling(); this.doStopScrolling();
return; return;
} }