Skip to content

currentPage is not correct when the viewport's height is a lot higher than the page's #237

@songkeys

Description

@songkeys

when the viewport's height is a lot higher than the page's height,

  • the currentPage will be 2 from the start (should be 1)
  • the currentPage cannot be 1 anymore

(setting viewportGap: 0 solves the above two issues but no the following.)

  • when call scrollToNextPage(), the page jumps to 3 then immediately to 4 (which is 1-off for every page)
  • when call scrollToPreviousPage(), the page does not jump
  • when call scrollToPreviousPage(), it only scrolls if we scroll the pdf manually just before, and it does not scroll to the correct previous page but the current page
Image

anyway, the behavior is so strange i believe there is something wrong with the height calculation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions