mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-10 00:21:42 +08:00
🐛 pdf 指定 page 失效
This commit is contained in:
parent
117dfb2bf7
commit
d34bb5adf7
@ -1210,7 +1210,6 @@ class PDFViewerApplication {
|
|||||||
let sidebarView = AppOptions.get('sidebarViewOnLoad')
|
let sidebarView = AppOptions.get('sidebarViewOnLoad')
|
||||||
let scrollMode = AppOptions.get('scrollModeOnLoad')
|
let scrollMode = AppOptions.get('scrollModeOnLoad')
|
||||||
let spreadMode = AppOptions.get('spreadModeOnLoad')
|
let spreadMode = AppOptions.get('spreadModeOnLoad')
|
||||||
|
|
||||||
if (stored.page && viewOnLoad !== ViewOnLoad.INITIAL) {
|
if (stored.page && viewOnLoad !== ViewOnLoad.INITIAL) {
|
||||||
hash =
|
hash =
|
||||||
`page=${stored.page}&zoom=${zoom || stored.zoom},` +
|
`page=${stored.page}&zoom=${zoom || stored.zoom},` +
|
||||||
@ -1268,6 +1267,11 @@ class PDFViewerApplication {
|
|||||||
setTimeout(resolve, FORCE_PAGES_LOADED_TIMEOUT)
|
setTimeout(resolve, FORCE_PAGES_LOADED_TIMEOUT)
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
|
// NOTE 通过引用打开
|
||||||
|
if (this.annoId && this.pdfId) {
|
||||||
|
webViewerPageNumberChanged(
|
||||||
|
{value: this.pdfId, pdfInstance: this, id: this.annoId})
|
||||||
|
}
|
||||||
if (!initialBookmark && !hash) {
|
if (!initialBookmark && !hash) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -1280,11 +1284,6 @@ class PDFViewerApplication {
|
|||||||
pdfViewer.currentScaleValue = pdfViewer.currentScaleValue
|
pdfViewer.currentScaleValue = pdfViewer.currentScaleValue
|
||||||
// Re-apply the initial document location.
|
// Re-apply the initial document location.
|
||||||
this.setInitialView(hash)
|
this.setInitialView(hash)
|
||||||
// NOTE 通过引用打开
|
|
||||||
if (this.annoId && this.pdfId) {
|
|
||||||
webViewerPageNumberChanged(
|
|
||||||
{value: this.pdfId, pdfInstance: this, id: this.annoId})
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// Ensure that the document is always completely initialized,
|
// Ensure that the document is always completely initialized,
|
||||||
// even if there are any errors thrown above.
|
// even if there are any errors thrown above.
|
||||||
|
Loading…
Reference in New Issue
Block a user