From d56ece5d3ad70b14ca0985ecc18271ad2d99d5b0 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 16 Jan 2019 20:56:10 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/TextPage/TextPage.vue | 6 +++--- client/components/Reader/share/BookParser.js | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index 858ebd5f..e220b7b2 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -142,8 +142,8 @@ class TextPage extends Vue { { begin: Number, end: Number, - paraBegin: Boolean, - paraEnd: Boolean, + first: Boolean, + last: Boolean, parts: array of { style: 'bold'|'italic', text: String, @@ -157,7 +157,7 @@ class TextPage extends Vue { y += this.lineHeight; let filled = false; - if (this.textAlignJustify && !line.paraEnd) { + if (this.textAlignJustify && !line.last) { const words = text.split(' '); if (words.length > 1) { let space = canvas.width - line.width + spaceWidth*(words.length - 1); diff --git a/client/components/Reader/share/BookParser.js b/client/components/Reader/share/BookParser.js index 9c606b4d..feb0d8df 100644 --- a/client/components/Reader/share/BookParser.js +++ b/client/components/Reader/share/BookParser.js @@ -253,8 +253,8 @@ export default class BookParser { { begin: Number, end: Number, - paraBegin: Boolean, - paraEnd: Boolean, + first: Boolean, + last: Boolean, parts: array of { style: 'bold'|'italic', text: String, @@ -279,8 +279,8 @@ export default class BookParser { line.parts.push({style: '', text: prevPart}); line.end = line.begin + prevPart.length;//нет -1 !!! line.width = prevW; - line.paraBegin = (k == 0); - line.paraEnd = false; + line.first = (k == 0); + line.last = false; lines.push(line); line = {begin: line.end + 1, parts: []}; @@ -295,8 +295,8 @@ export default class BookParser { line.parts.push({style: '', text: prevPart}); line.end = line.begin + prevPart.length - 1; line.width = prevW; - line.paraBegin = (k == 0); - line.paraEnd = true; + line.first = (k == 0); + line.last = true; lines.push(line); parsed.lines = lines;