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

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-catalog',
version: '3.3.0',
version: '3.3.1',
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
}

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);
}