`;
- const l2 = parseInt(Math.ceil(len/2), 10);
+ //левая страница
+ out += `
`;
+ const l2 = (this.pageRowsCount > len ? len : this.pageRowsCount);
for (let i = 0; i < l2; i++) {
out += this.drawLine(lines[i], i, 0, sel, imageDrawn1);
}
out += '
`;
+ //разделитель
+ out += `
`;
+
+ //правая страница
+ out += `
`;
for (let i = l2; i < len; i++) {
out += this.drawLine(lines[i], i, l2, sel, imageDrawn2);
}
diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue
index 56998bdc..45d2921f 100644
--- a/client/components/Reader/TextPage/TextPage.vue
+++ b/client/components/Reader/TextPage/TextPage.vue
@@ -169,8 +169,8 @@ class TextPage extends Vue {
this.h = this.scrollHeight - 2*this.indentTB;
this.lineHeight = this.fontSize + this.lineInterval;
- const pageRowsCount = 1 + Math.floor((this.h - this.lineHeight + this.lineInterval/2)/this.lineHeight);
- this.pageLineCount = (this.dualPageMode ? pageRowsCount*2 : pageRowsCount)
+ this.pageRowsCount = 1 + Math.floor((this.h - this.lineHeight + this.lineInterval/2)/this.lineHeight);
+ this.pageLineCount = (this.dualPageMode ? this.pageRowsCount*2 : this.pageRowsCount)
//stuff
this.currentAnimation = '';
@@ -190,8 +190,16 @@ class TextPage extends Vue {
this.drawHelper.lastBook = this.lastBook;
this.drawHelper.book = this.book;
this.drawHelper.parsed = this.parsed;
+ this.drawHelper.pageRowsCount = this.pageRowsCount;
this.drawHelper.pageLineCount = this.pageLineCount;
+
this.drawHelper.dualPageMode = this.dualPageMode;
+ this.drawHelper.dualIndentLR = this.dualIndentLR;
+ this.drawHelper.dualDivWidth = this.dualDivWidth;
+ this.drawHelper.dualDivHeight = this.dualDivHeight;
+ this.drawHelper.dualDivColor = this.hex2rgba(this.textColor || '#000000', this.dualDivColorAlpha);
+ this.drawHelper.dualDivStrokeFill = this.dualDivStrokeFill;
+ this.drawHelper.dualDivStrokeGap = this.dualDivStrokeGap;
this.drawHelper.backgroundColor = this.backgroundColor;
this.drawHelper.statusBarColor = this.statusBarColor;
@@ -207,7 +215,6 @@ class TextPage extends Vue {
this.drawHelper.w = this.w;
this.drawHelper.h = this.h;
this.drawHelper.indentLR = this.indentLR;
- this.drawHelper.dualIndentLR = this.dualIndentLR;
this.drawHelper.textAlignJustify = this.textAlignJustify;
this.drawHelper.lineHeight = this.lineHeight;
this.drawHelper.context = this.context;
@@ -259,7 +266,7 @@ class TextPage extends Vue {
}
//scrolling page
- const pageSpace = this.scrollHeight - pageRowsCount*this.lineHeight;
+ const pageSpace = this.scrollHeight - this.pageRowsCount*this.lineHeight;
let top = pageSpace/2;
if (this.showStatusBar)
top += this.statusBarHeight*(this.statusBarTop ? 1 : 0);
diff --git a/client/store/modules/reader.js b/client/store/modules/reader.js
index dafa04ec..ec81a923 100644
--- a/client/store/modules/reader.js
+++ b/client/store/modules/reader.js
@@ -225,8 +225,14 @@ const settingDefaults = {
indentTB: 0,// px, отступ всего текста сверху и снизу
wordWrap: true,//перенос по слогам
keepLastToFirst: false,// перенос последней строки в первую при листании
+
dualPageMode: false,
dualIndentLR: 10,// px, отступ слева и справа внутри страницы в двухстраничном режиме
+ dualDivWidth: 4,// px, ширина разделителя
+ dualDivHeight: 96,// процент, высота разделителя
+ dualDivColorAlpha: 1,// прозрачность разделителя
+ dualDivStrokeFill: 1,// px, заполнение пунктира
+ dualDivStrokeGap: 1,// px, промежуток пунктира
showStatusBar: true,
statusBarTop: false,// top, bottom