mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Move various viewer components options from PDFJS
/PDFViewerApplication.viewerPrefs
and into AppOptions
instead
This commit is contained in:
parent
09da99b8a0
commit
81c550903f
6 changed files with 155 additions and 124 deletions
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPromiseCapability, PDFJS } from 'pdfjs-lib';
|
||||
import { createPromiseCapability } from 'pdfjs-lib';
|
||||
|
||||
const CSS_UNITS = 96.0 / 72.0;
|
||||
const DEFAULT_SCALE_VALUE = 'auto';
|
||||
|
@ -71,39 +71,6 @@ let NullL10n = {
|
|||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Enables CSS only zooming.
|
||||
* @var {boolean}
|
||||
*/
|
||||
PDFJS.useOnlyCssZoom = (PDFJS.useOnlyCssZoom === undefined ?
|
||||
false : PDFJS.useOnlyCssZoom);
|
||||
|
||||
/**
|
||||
* The maximum supported canvas size in total pixels e.g. width * height.
|
||||
* The default value is 4096 * 4096. Use -1 for no limit.
|
||||
* @var {number}
|
||||
*/
|
||||
PDFJS.maxCanvasPixels = (PDFJS.maxCanvasPixels === undefined ?
|
||||
16777216 : PDFJS.maxCanvasPixels);
|
||||
|
||||
/**
|
||||
* Disables saving of the last position of the viewed PDF.
|
||||
* @var {boolean}
|
||||
*/
|
||||
PDFJS.disableHistory = (PDFJS.disableHistory === undefined ?
|
||||
false : PDFJS.disableHistory);
|
||||
|
||||
if (typeof PDFJSDev === 'undefined' ||
|
||||
!PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
||||
/**
|
||||
* Interface locale settings.
|
||||
* @var {string}
|
||||
*/
|
||||
PDFJS.locale =
|
||||
(PDFJS.locale === undefined && typeof navigator !== 'undefined' ?
|
||||
navigator.language : PDFJS.locale) || 'en-US';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns scale factor for the canvas. It makes sense for the HiDPI displays.
|
||||
* @return {Object} The object with horizontal (sx) and vertical (sy)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue