mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
[Editor] Fix the dimensions of the annotation editor layer (follow-up of #16794)
This commit is contained in:
parent
de1f31aae8
commit
400699687e
3 changed files with 19 additions and 5 deletions
|
@ -22,6 +22,7 @@ import {
|
|||
} from "./base_factory.js";
|
||||
import {
|
||||
BaseException,
|
||||
FeatureTest,
|
||||
shadow,
|
||||
stringToBytes,
|
||||
Util,
|
||||
|
@ -967,8 +968,6 @@ function getCurrentTransformInverse(ctx) {
|
|||
return [a, b, c, d, e, f];
|
||||
}
|
||||
|
||||
const useRound = globalThis.CSS?.supports?.("width: round(1.5px, 1px)");
|
||||
|
||||
/**
|
||||
* @param {HTMLDivElement} div
|
||||
* @param {PageViewport} viewport
|
||||
|
@ -984,6 +983,7 @@ function setLayerDimensions(
|
|||
if (viewport instanceof PageViewport) {
|
||||
const { pageWidth, pageHeight } = viewport.rawDims;
|
||||
const { style } = div;
|
||||
const useRound = FeatureTest.isCSSRoundSupported;
|
||||
|
||||
const w = `var(--scale-factor) * ${pageWidth}px`,
|
||||
h = `var(--scale-factor) * ${pageHeight}px`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue