fix(dees-pdf-viewer): Scroll active PDF thumbnail into view after rendering and on page changes; update dependency versions

This commit is contained in:
2025-12-11 23:35:43 +00:00
parent 59a870c3bc
commit 12a7156928
5 changed files with 101 additions and 60 deletions

View File

@@ -299,6 +299,8 @@ export class DeesPdfViewer extends DeesElement {
await this.renderThumbnails();
// Re-setup intersection observer for lazy loading of pages
this.setupIntersectionObserver();
// Scroll to active thumbnail after rendering
this.scrollThumbnailIntoView(this.currentPage);
}
}
@@ -578,6 +580,11 @@ export class DeesPdfViewer extends DeesElement {
// Update current page
this.currentPage = pageNum;
// Scroll thumbnail into view if sidebar is visible
if (this.showSidebar) {
this.scrollThumbnailIntoView(pageNum);
}
// Ensure the page is rendered
await this.renderPageIfNeeded(pageNum);
}