feat: PDF annotations for documents (#40) #54

Merged
marcel merged 10 commits from feat/40-pdf-annotations into main 2026-03-24 10:00:28 +01:00
Showing only changes of commit ca5726e7c3 - Show all commits

View File

@@ -141,7 +141,10 @@ $effect(() => {
});
$effect(() => {
if (pdfDoc && currentPage) {
// Read scale synchronously so Svelte tracks it as a dependency.
// Without this, zoom changes don't re-trigger the effect because
// scale is only read inside the async renderPage call.
if (pdfDoc && currentPage && scale > 0) {
renderPage(pdfDoc, currentPage).then(() => {
if (pdfDoc) prerender(pdfDoc, currentPage);
});