feat: PDF annotations for documents (#40) #54
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user