mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-22 07:25:04 +00:00
Removed rounding causing images to scale on viewer
This commit is contained in:
parent
86becc61de
commit
a3596c9618
@ -6385,8 +6385,8 @@ function setLayerDimensions(div, viewport, mustFlip = false, mustRotate = true)
|
|||||||
const useRound = util_FeatureTest.isCSSRoundSupported;
|
const useRound = util_FeatureTest.isCSSRoundSupported;
|
||||||
const w = `var(--scale-factor) * ${pageWidth}px`,
|
const w = `var(--scale-factor) * ${pageWidth}px`,
|
||||||
h = `var(--scale-factor) * ${pageHeight}px`;
|
h = `var(--scale-factor) * ${pageHeight}px`;
|
||||||
const widthStr = useRound ? `round(up, ${w}, 1px)` : `calc(${w})`,
|
const widthStr = useRound ? `round(${w}, 1px)` : `calc(${w})`,
|
||||||
heightStr = useRound ? `round(up, ${h}, 1px)` : `calc(${h})`;
|
heightStr = useRound ? `round(${h}, 1px)` : `calc(${h})`;
|
||||||
if (!mustFlip || viewport.rotation % 180 === 0) {
|
if (!mustFlip || viewport.rotation % 180 === 0) {
|
||||||
style.width = widthStr;
|
style.width = widthStr;
|
||||||
style.height = heightStr;
|
style.height = heightStr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user