mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 09:37:26 +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());
|
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) {
|
function fitHeight(updateStatus = true) {
|
||||||
@@ -10664,7 +10664,8 @@ function applyFit(updateStatus = true) {
|
|||||||
|
|
||||||
function setScale(nextScale, updateStatus = true, fitMode = "free") {
|
function setScale(nextScale, updateStatus = true, fitMode = "free") {
|
||||||
const anchor = updateStatus && fitMode === "free" ? scaleAnchor() : null;
|
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;
|
const layoutChanged = scale !== state.scale || fitMode !== state.fitMode;
|
||||||
state.fitMode = fitMode;
|
state.fitMode = fitMode;
|
||||||
state.scale = scale;
|
state.scale = scale;
|
||||||
|
|||||||
Reference in new issue
Block a user