From eac5a659e6b014cda7f3b39c17df441ea56fbf67 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Tue, 20 Oct 2026 00:04:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=89=8D=E7=AB=AF=E7=95=8C=E9=9D=A2):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B7=B7=E5=90=88=E5=B0=BA=E5=AF=B8=E5=8F=8C?= =?UTF-8?q?=E9=A1=B5=E6=A8=AA=E5=90=91=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/webui/ofdgo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/webui/ofdgo.js b/assets/webui/ofdgo.js index 7badf6b..9933d47 100644 --- a/assets/webui/ofdgo.js +++ b/assets/webui/ofdgo.js @@ -12184,12 +12184,13 @@ function fitPageScale(page, mode) { contentHeight += item.height * MM_TO_PX * factor; rows++; } + const layoutWidth = state.pageLayout > 1 ? Math.max(width, contentWidth) : width; const scrollbar = scrollbarWidth(); let vertical = false, horizontal = false, scale = 1; for (let pass = 0; pass < 3; pass++) { const availableWidth = Math.max(1, el.viewerPanel.offsetWidth - (vertical ? scrollbar : 0)); const availableHeight = Math.max(1, el.viewerPanel.offsetHeight - (horizontal ? scrollbar : 0)); - scale = Math.min(4, Math.max(1, availableWidth - space * 2 - gap) / width); + scale = Math.min(4, Math.max(1, availableWidth - space * 2 - gap) / layoutWidth); if (mode === "height") scale = Math.min(scale, Math.max(1, availableHeight - space * 2) / height); const blockSpace = state.continuous ? 0 : Math.max(space, (availableHeight - height * scale) / 2); const rowGap = state.continuous ? 0 : Math.max(gap, blockSpace > space ? blockSpace + 1 : blockSpace);