Removed rounding causing images to scale on viewer

This commit is contained in:
Connor Yoh 2025-03-24 17:36:05 +00:00
parent 86becc61de
commit a3596c9618

View File

@ -6385,8 +6385,8 @@ function setLayerDimensions(div, viewport, mustFlip = false, mustRotate = true)
const useRound = util_FeatureTest.isCSSRoundSupported;
const w = `var(--scale-factor) * ${pageWidth}px`,
h = `var(--scale-factor) * ${pageHeight}px`;
const widthStr = useRound ? `round(up, ${w}, 1px)` : `calc(${w})`,
heightStr = useRound ? `round(up, ${h}, 1px)` : `calc(${h})`;
const widthStr = useRound ? `round(${w}, 1px)` : `calc(${w})`,
heightStr = useRound ? `round(${h}, 1px)` : `calc(${h})`;
if (!mustFlip || viewport.rotation % 180 === 0) {
style.width = widthStr;
style.height = heightStr;