Skip to content

fix: Keep highlight when page is zoomed in/out#2

Merged
MauritsBrinkman merged 1 commit intocaptide-tech:mainfrom
ahmetkursatd:pdf-viewer-zoom-highlight-improvement
Jan 28, 2026
Merged

fix: Keep highlight when page is zoomed in/out#2
MauritsBrinkman merged 1 commit intocaptide-tech:mainfrom
ahmetkursatd:pdf-viewer-zoom-highlight-improvement

Conversation

@ahmetkursatd
Copy link
Copy Markdown
Contributor

This change prevents zoom-triggered PDF reloads and make highlight navigation optional. The document viewer no longer reloads the PDF when zoomLevel changes, and highlight creation now accepts an an option to suppress page navigation during highlight recreation. This keeps the viewer on the current page while still refreshing highlights after zoom. Changes are in document-viewer.tsx and pdf-highlighting.ts.

Summary:

  • Stop full PDF reloads on zoom by removing zoomLevel from the render effect deps in document-viewer.tsx.
  • Extend createRectangleHighlight to accept shouldNavigateOnMatch and wire it from the viewer to avoid forced page jumps during highlight recreation.
  • Align highlight calls with the new options-object signature.

@MauritsBrinkman MauritsBrinkman merged commit bab7131 into captide-tech:main Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants