Merge pull request #9031 from Snuffleupagus/rm-viewer-2.0-fallback-code
Remove all warning/fallback code for obsolete method signatures in `web/` files
This commit is contained in:
commit
5dd1c9a98b
12
web/app.js
12
web/app.js
@ -633,11 +633,6 @@ let PDFViewerApplication = {
|
||||
* is opened.
|
||||
*/
|
||||
open(file, args) {
|
||||
if ((typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) &&
|
||||
(arguments.length > 2 || typeof args === 'number')) {
|
||||
return Promise.reject(
|
||||
new Error('Call of open() with obsolete signature.'));
|
||||
}
|
||||
if (this.pdfLoadingTask) {
|
||||
// We need to destroy already opened document.
|
||||
return this.close().then(() => {
|
||||
@ -667,12 +662,7 @@ let PDFViewerApplication = {
|
||||
|
||||
if (args) {
|
||||
for (let prop in args) {
|
||||
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PDFJS_NEXT')) &&
|
||||
!PDFJS.pdfjsNext && prop === 'scale') {
|
||||
console.error('Call of open() with obsolete "scale" argument, ' +
|
||||
'please use the "defaultZoomValue" preference instead.');
|
||||
continue;
|
||||
} else if (prop === 'length') {
|
||||
if (prop === 'length') {
|
||||
this.pdfDocumentProperties.setFileSize(args[prop]);
|
||||
}
|
||||
parameters[prop] = args[prop];
|
||||
|
@ -601,11 +601,6 @@ class BaseViewer {
|
||||
* @param {ScrollPageIntoViewParameters} params
|
||||
*/
|
||||
scrollPageIntoView(params) {
|
||||
if ((typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) &&
|
||||
(arguments.length > 1 || typeof params === 'number')) {
|
||||
console.error('Call of scrollPageIntoView() with obsolete signature.');
|
||||
return;
|
||||
}
|
||||
if (!this.pdfDocument) {
|
||||
return;
|
||||
}
|
||||
|
@ -260,14 +260,6 @@ class PDFLinkService {
|
||||
});
|
||||
}
|
||||
} else { // Named (or explicit) destination.
|
||||
if ((typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) &&
|
||||
/^\d+$/.test(hash) && hash <= this.pagesCount) {
|
||||
console.warn('PDFLinkService_setHash: specifying a page number ' +
|
||||
'directly after the hash symbol (#) is deprecated, ' +
|
||||
`please use the "#page=${hash}" form instead.`);
|
||||
this.page = hash | 0;
|
||||
}
|
||||
|
||||
dest = unescape(hash);
|
||||
try {
|
||||
dest = JSON.parse(dest);
|
||||
|
Loading…
Reference in New Issue
Block a user