Remove the ignoreCurrentPositionOnZoom
viewer option
The only reason for adding this parameter in the first place, all the way back in PR 4074, was that the "maintain document position on zooming" feature was landed and backed out a couple of times before it finally stuck. Hence it seemed, at the time, like a good idea to have a simple way to disable that behaviour. However, that was almost four years ago, and it's just not likely that we'd want/need to ever disable it now. Furthermore I really cannot imagine why anyone would actually *want* to reset the position whenever zooming occurs, since it results in a quite annoying UX. *So, to summarize:* Based on the above, I think that we should try to remove this parameter now. On the off chance that anyone complains, re-adding it shouldn't be difficult.
This commit is contained in:
parent
85e006720e
commit
2f936f88f4
@ -1525,10 +1525,6 @@ function webViewerInitialized() {
|
||||
if ('verbosity' in hashParams) {
|
||||
PDFJS.verbosity = hashParams['verbosity'] | 0;
|
||||
}
|
||||
if ('ignorecurrentpositiononzoom' in hashParams) {
|
||||
PDFJS.ignoreCurrentPositionOnZoom =
|
||||
(hashParams['ignorecurrentpositiononzoom'] === 'true');
|
||||
}
|
||||
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {
|
||||
if ('disablebcmaps' in hashParams && hashParams['disablebcmaps']) {
|
||||
PDFJS.cMapUrl = '../external/cmaps/';
|
||||
|
@ -505,7 +505,7 @@ class BaseViewer {
|
||||
|
||||
if (!noScroll) {
|
||||
let page = this._currentPageNumber, dest;
|
||||
if (this._location && !PDFJS.ignoreCurrentPositionOnZoom &&
|
||||
if (this._location &&
|
||||
!(this.isInPresentationMode || this.isChangingPresentationMode)) {
|
||||
page = this._location.pageNumber;
|
||||
dest = [null, { name: 'XYZ', }, this._location.left,
|
||||
|
@ -102,12 +102,6 @@ PDFJS.disableHistory = (PDFJS.disableHistory === undefined ?
|
||||
PDFJS.disableTextLayer = (PDFJS.disableTextLayer === undefined ?
|
||||
false : PDFJS.disableTextLayer);
|
||||
|
||||
/**
|
||||
* Disables maintaining the current position in the document when zooming.
|
||||
*/
|
||||
PDFJS.ignoreCurrentPositionOnZoom = (PDFJS.ignoreCurrentPositionOnZoom ===
|
||||
undefined ? false : PDFJS.ignoreCurrentPositionOnZoom);
|
||||
|
||||
if (typeof PDFJSDev === 'undefined' ||
|
||||
!PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user