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.
|
* is opened.
|
||||||
*/
|
*/
|
||||||
open(file, args) {
|
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) {
|
if (this.pdfLoadingTask) {
|
||||||
// We need to destroy already opened document.
|
// We need to destroy already opened document.
|
||||||
return this.close().then(() => {
|
return this.close().then(() => {
|
||||||
@ -667,12 +662,7 @@ let PDFViewerApplication = {
|
|||||||
|
|
||||||
if (args) {
|
if (args) {
|
||||||
for (let prop in args) {
|
for (let prop in args) {
|
||||||
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PDFJS_NEXT')) &&
|
if (prop === 'length') {
|
||||||
!PDFJS.pdfjsNext && prop === 'scale') {
|
|
||||||
console.error('Call of open() with obsolete "scale" argument, ' +
|
|
||||||
'please use the "defaultZoomValue" preference instead.');
|
|
||||||
continue;
|
|
||||||
} else if (prop === 'length') {
|
|
||||||
this.pdfDocumentProperties.setFileSize(args[prop]);
|
this.pdfDocumentProperties.setFileSize(args[prop]);
|
||||||
}
|
}
|
||||||
parameters[prop] = args[prop];
|
parameters[prop] = args[prop];
|
||||||
|
@ -601,11 +601,6 @@ class BaseViewer {
|
|||||||
* @param {ScrollPageIntoViewParameters} params
|
* @param {ScrollPageIntoViewParameters} params
|
||||||
*/
|
*/
|
||||||
scrollPageIntoView(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) {
|
if (!this.pdfDocument) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -260,14 +260,6 @@ class PDFLinkService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else { // Named (or explicit) destination.
|
} 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);
|
dest = unescape(hash);
|
||||||
try {
|
try {
|
||||||
dest = JSON.parse(dest);
|
dest = JSON.parse(dest);
|
||||||
|
Loading…
Reference in New Issue
Block a user