From d34bb5adf7883b8a1de511d2e69a83f6777bfd21 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 17 Jan 2023 01:20:24 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20pdf=20=E6=8C=87=E5=AE=9A=20page=20?= =?UTF-8?q?=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/asset/pdf/app.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/asset/pdf/app.js b/app/src/asset/pdf/app.js index f07d7a125..169eada72 100644 --- a/app/src/asset/pdf/app.js +++ b/app/src/asset/pdf/app.js @@ -1210,7 +1210,6 @@ class PDFViewerApplication { let sidebarView = AppOptions.get('sidebarViewOnLoad') let scrollMode = AppOptions.get('scrollModeOnLoad') let spreadMode = AppOptions.get('spreadModeOnLoad') - if (stored.page && viewOnLoad !== ViewOnLoad.INITIAL) { hash = `page=${stored.page}&zoom=${zoom || stored.zoom},` + @@ -1268,6 +1267,11 @@ class PDFViewerApplication { setTimeout(resolve, FORCE_PAGES_LOADED_TIMEOUT) }), ]) + // NOTE 通过引用打开 + if (this.annoId && this.pdfId) { + webViewerPageNumberChanged( + {value: this.pdfId, pdfInstance: this, id: this.annoId}) + } if (!initialBookmark && !hash) { return } @@ -1280,11 +1284,6 @@ class PDFViewerApplication { pdfViewer.currentScaleValue = pdfViewer.currentScaleValue // Re-apply the initial document location. this.setInitialView(hash) - // NOTE 通过引用打开 - if (this.annoId && this.pdfId) { - webViewerPageNumberChanged( - {value: this.pdfId, pdfInstance: this, id: this.annoId}) - } }).catch(() => { // Ensure that the document is always completely initialized, // even if there are any errors thrown above.