feat(前端界面): 修复适宽连续阅读横向溢出
build.yaml / build (push) Successful in 51s

This commit is contained in:
xiaoqidun committed 2026-10-15 09:39:13 +08:00
1 parent aacf789615
commit 97a00cf1a8
1 file changed
+3 -2
+3 -2
View File
@@ -10609,7 +10609,7 @@ function fitWidthScale(page) {
available = Math.max(1, available - scrollbarWidth());
}
}
return Math.min(4, Math.max(0.2, available / width));
return Math.min(4, available / width);
}
function fitHeight(updateStatus = true) {
@@ -10664,7 +10664,8 @@ function applyFit(updateStatus = true) {
function setScale(nextScale, updateStatus = true, fitMode = "free") {
const anchor = updateStatus && fitMode === "free" ? scaleAnchor() : null;
const scale = Math.min(4, Math.max(0.2, nextScale));
// 适配缩放不受手动下限限制,避免大页面撑出视区。
const scale = Math.min(4, fitMode === "free" ? Math.max(0.2, nextScale) : nextScale);
const layoutChanged = scale !== state.scale || fitMode !== state.fitMode;
state.fitMode = fitMode;
state.scale = scale;