Update the Annotation --zoom-factor CSS variable when PDFPageView is used standalone (PR 13868 follow-up)

Without this patch, when using `PDFPageView` directly[1] this CSS variable won't be updated and consequently things won't work as intended.
This is purposely implemented such that when a `PDFPageView`-instance is part of a viewer, we don't repeatedly set the CSS variable for every single page.

---
[1] See e.g. the "pageviewer" example in the `examples/components/` folder.
This commit is contained in:
Jonas Jenwald 2021-08-05 11:32:45 +02:00
parent 4ad65c8b9c
commit 561faa7c94
3 changed files with 12 additions and 2 deletions

View file

@ -60,6 +60,13 @@ class PDFRenderingQueue {
return this.highestPriorityPage === view.renderingId;
}
/**
* @returns {boolean}
*/
hasViewer() {
return !!this.pdfViewer;
}
/**
* @param {Object} currentlyVisiblePages
*/