fix(编辑能力): 修复旋转后纵向滚动回弹
build.yaml / build (push) Successful in 44s

This commit is contained in:
xiaoqidun committed 2026-10-29 16:44:01 +08:00
1 parent 19084bb40b
commit aebcda51a3
1 file changed
+2 -1
+2 -1
View File
@@ -295,7 +295,8 @@ export function createPageView(context) {
if (context.state.editing && shell.classList.contains("rendered")) { if (context.state.editing && shell.classList.contains("rendered")) {
const bounds = shell.getBoundingClientRect(), viewport = context.el.viewerPanel.getBoundingClientRect(); const bounds = shell.getBoundingClientRect(), viewport = context.el.viewerPanel.getBoundingClientRect();
const margin = context.state.pageWindow?.overscan ?? 600; const margin = context.state.pageWindow?.overscan ?? 600;
if (bounds.bottom >= viewport.top - margin && bounds.top <= viewport.bottom + margin) { const bottom = Math.max(bounds.bottom, bounds.top + shell.scrollHeight);
if (bottom >= viewport.top - margin && bounds.top <= viewport.bottom + margin) {
context.state.selectedPages.add(index); context.state.selectedPages.add(index);
return; return;
} }