mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Replace the --viewport-scale-factor
CSS variable
This CSS variable is only used together with the `annotationCanvasMap`-functionality in the canvas-code, however its value can be *trivially* computed by using the older `--zoom-factor` CSS variable together with the `PixelsPerInch`-structure. Rather than having *two different* CSS variables that are this closely linked, it seems better to simplify things by using just one CSS variable instead.
This commit is contained in:
parent
143ba30bef
commit
e67cd7fae0
4 changed files with 4 additions and 10 deletions
|
@ -1012,10 +1012,6 @@ class BaseViewer {
|
|||
}
|
||||
|
||||
this._doc.style.setProperty("--zoom-factor", newScale);
|
||||
this._doc.style.setProperty(
|
||||
"--viewport-scale-factor",
|
||||
newScale * PixelsPerInch.PDF_TO_CSS_UNITS
|
||||
);
|
||||
|
||||
const updateArgs = { scale: newScale };
|
||||
for (const pageView of this._pages) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue