mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 15:06:46 +08:00
1 parent
aacf789615
commit
97a00cf1a8
1 file changed
+3
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user