From 2b755e534e8ae1ac1d91e3eff83c7798b3d24d27 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 24 Jan 2019 16:42:47 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9A=20=D0=BF=D1=80=D0=B5=D0=B4=D1=8B=D0=B4?= =?UTF-8?q?=D1=83=D1=89=D0=B5=D0=BC=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/TextPage/TextPage.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index 9ee988fa..6ddb06f4 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -227,23 +227,25 @@ class TextPage extends Vue { this.activeCanvas = !this.activeCanvas; - immediate = true; if (immediate) { if (this.activeCanvas) this.page1 = this.drawPage(this.bookPos); else this.page2 = this.drawPage(this.bookPos); } else { - /*if (this.pageChangeDirectionDown && this.pagePrepared && this.bookPos == this.bookPosPrepared) { + if (this.pageChangeDirectionDown && this.pagePrepared && this.bookPos == this.bookPosPrepared) { this.linesDown = this.linesDownNext; this.linesUp = this.linesUpNext; this.pagePrepared = false; this.debouncedPrepareNextPage(); } else { - this.drawPage(context, this.bookPos); + if (this.activeCanvas) + this.page1 = this.drawPage(this.bookPos); + else + this.page2 = this.drawPage(this.bookPos); this.pagePrepared = false; this.debouncedPrepareNextPage(); - }*/ + } if (this.currentTransition) { //this.currentTransition @@ -408,8 +410,10 @@ class TextPage extends Vue { if (i >= 0 && this.linesDown.length > i) { this.bookPosPrepared = this.linesDown[i].begin; - const ctx = (!this.activeCanvas ? this.context1 : this.context2); - this.drawPage(ctx, this.bookPosPrepared, true); + if (this.activeCanvas) + this.page2 = this.drawPage(this.bookPosPrepared, true);//наоборот + else + this.page1 = this.drawPage(this.bookPosPrepared, true); this.pagePrepared = true; }