mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
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:
parent
4ad65c8b9c
commit
561faa7c94
3 changed files with 12 additions and 2 deletions
|
@ -202,7 +202,6 @@ class BaseViewer {
|
|||
} else {
|
||||
this.renderingQueue = options.renderingQueue;
|
||||
}
|
||||
|
||||
this._doc = document.documentElement;
|
||||
|
||||
this.scroll = watchScroll(this.container, this._scrollUpdate.bind(this));
|
||||
|
@ -708,7 +707,6 @@ class BaseViewer {
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this._doc.style.setProperty("--zoom-factor", newScale);
|
||||
|
||||
for (let i = 0, ii = this._pages.length; i < ii; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue