fix custom selection bug (#871)

This commit is contained in:
LawyZheng
2024-09-21 21:05:40 +08:00
committed by GitHub
parent 76a256ffaa
commit 839320dd42
3 changed files with 19 additions and 0 deletions

View File

@@ -1476,6 +1476,14 @@ function scrollToTop(draw_boxes) {
return window.scrollY;
}
function getScrollXY() {
return [window.scrollX, window.scrollY];
}
function scrollToXY(x, y) {
window.scroll({ left: x, top: y, behavior: "instant" });
}
function scrollToNextPage(draw_boxes) {
// remove bounding boxes, scroll to next page with 200px overlap, then draw bounding boxes again
// return true if there is a next page, false otherwise