Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BaseViewer.scrollPageIntoView to always validate the pageNumber parameter #10245

Merged
merged 2 commits into from
Nov 9, 2018

Commits on Nov 9, 2018

  1. Update BaseViewer.scrollPageIntoView to always validate the `pageNu…

    …mber` parameter
    
    Note that when e.g. presentation mode is active, we fail[1] to ensure that the `pageNumber` parameter is actually an integer before calling `_setCurrentPageNumber` (that method expects the argument be an integer).
    Also changes the method signature, of `scrollPageIntoView`, to use object destructuring instead.
    
    ---
    [1] Most likely, this is actually *my* oversight :-)
    Snuffleupagus committed Nov 9, 2018
    Configuration menu
    Copy the full SHA
    2e38b7d View commit details
    Browse the repository at this point in the history
  2. Directly call _setCurrentPageNumber when updating the Scroll/Spread…

    … modes in `BaseViewer`
    
    Given that the `_updateScrollMode`/`_updateSpreadMode` methods are "private", there's no particular reason to not just directly call `_setCurrentPageNumber`.
    Snuffleupagus committed Nov 9, 2018
    Configuration menu
    Copy the full SHA
    e16e072 View commit details
    Browse the repository at this point in the history