Coding Phase - Week 4 Report

Whats done

  • Lazy page rendering.
  • Change to vertical scroll for embedded viewer.
  • Implement a scroll disabling feature to avoid unintentional scrolls (experimental, feedback required).
  • Add support to link to a specific page.
  • Added a page number and anchor indicator.

Plans for next week

  • Add unit tests for work done till now.
  • Create a PR for the embedded viewer.
  • Preserve the last scroll position while re-rendering. (and other state info)

Scroll disabling feature

To eliminate the issue with vertical scroll discussed in the last post, I came up with this feature. I would like to have some feedback on it, or can remove it completely if it causes issues.
Here at first by default all the pdf viewers have scroll disabled, to scroll click anywhere inside the viewer area, to disable again click anywhere outside the pdf-viewer on the note viewer.
This is aimed at preventing accidental scrolls when the cursor is over the pdf-viewer.

Link to specific page number

To always show a particular page first in the viewer, you can how add a #page-no at the end of the resource id. Example: [Mydoc.pdf](:/def53721f1ef45eab30f8c420198408c#4), this will always scroll to page 4 when rendered.