-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Remove the BaseViewer._getCurrentVisiblePage
helper method
#14750
Remove the BaseViewer._getCurrentVisiblePage
helper method
#14750
Conversation
This method was originally added specifically to work-around bugs/issues related to PresentationMode in Google Chrome. Note that prior to PR 14112 we were using some CSS hacks to only show the current page in PresentationMode, and that could lead to the `getVisibleElements` function not always finding the correct elements. However, after the changes in PR 14112 we're now using the Page-scrolling mode in PresentationMode and consequently there'll only be *a single* page visible at a time. Hence then `BaseViewer._getCurrentVisiblePage` helper method should no longer be needed, and when testing (locally) in Google Chrome everything seems to work correctly now.
…n PresentationMode The `pdfOpenParams` parameter has never really made sense in PresentationMode, since e.g. the zoom-value doesn't (generally) agree with the value chosen by the user prior to entering PresentationMode. This has never mattered all that much, since the `viewBookmark`-button isn't visible in PresentationMode (nor is any other toolbar button for that matter). However, in the `PDFHistory`-implementation we're currently forced to handle this case specifically since we don't want to populate the browser history with nonsensical state. Hence it makes overall sense, as far as I'm concerned, to tweak the "updateviewarea" event to include a *simplified* `pdfOpenParams` parameter when PresentationMode is active. Given that the `viewer components` don't include PresentationMode functionality, this change thus shouldn't matter for third-party users.
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/4422c2a1ab9e1bc/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/ff83522938d5c48/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/4422c2a1ab9e1bc/output.txt Total script time: 4.01 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/ff83522938d5c48/output.txt Total script time: 6.96 mins
|
Makes sense; nice work! |
Remove the
BaseViewer._getCurrentVisiblePage
helper methodThis method was originally added specifically to work-around bugs/issues related to PresentationMode in Google Chrome. Note that prior to PR Add a new Page scrolling mode (issue 2638, 8952, 10907) #14112 we were using some CSS hacks to only show the current page in PresentationMode, and that could lead to the
getVisibleElements
function not always finding the correct elements.However, after the changes in PR Add a new Page scrolling mode (issue 2638, 8952, 10907) #14112 we're now using the Page-scrolling mode in PresentationMode and consequently there'll only be a single page visible at a time. Hence then
BaseViewer._getCurrentVisiblePage
helper method should no longer be needed, and when testing (locally) in Google Chrome everything seems to work correctly now.Tweak the
pdfOpenParams
parameter, in the "updateviewarea" event, in PresentationModeThe
pdfOpenParams
parameter has never really made sense in PresentationMode, since e.g. the zoom-value doesn't (generally) agree with the value chosen by the user prior to entering PresentationMode.This has never mattered all that much, since the
viewBookmark
-button isn't visible in PresentationMode (nor is any other toolbar button for that matter). However, in thePDFHistory
-implementation we're currently forced to handle this case specifically since we don't want to populate the browser history with nonsensical state.Hence it makes overall sense, as far as I'm concerned, to tweak the "updateviewarea" event to include a simplified
pdfOpenParams
parameter when PresentationMode is active. Given that theviewer components
don't include PresentationMode functionality, this change thus shouldn't matter for third-party users.