mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
19084bb40b
commit
aebcda51a3
1 file changed
+2
-1
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user