Rename PDFDocumentProxy.pdfInfo to PDFDocumentProxy._pdfInfo to indicate that the property should be considered "private"

Since `PDFDocumentProxy` already provide getters for all the data returned by `GetDoc` (in the Worker), there isn't any compelling reason for accessing the `pdfInfo` directly on `PDFDocumentProxy`.
This commit is contained in:
Jonas Jenwald 2018-06-05 20:30:00 +02:00
parent e89afa5899
commit 4f4b50e01e

View File

@ -585,7 +585,7 @@ var PDFDataRangeTransport = (function pdfDataRangeTransportClosure() {
*/ */
var PDFDocumentProxy = (function PDFDocumentProxyClosure() { var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
function PDFDocumentProxy(pdfInfo, transport, loadingTask) { function PDFDocumentProxy(pdfInfo, transport, loadingTask) {
this.pdfInfo = pdfInfo; this._pdfInfo = pdfInfo;
this.transport = transport; this.transport = transport;
this.loadingTask = loadingTask; this.loadingTask = loadingTask;
} }
@ -594,14 +594,14 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
* @return {number} Total number of pages the PDF contains. * @return {number} Total number of pages the PDF contains.
*/ */
get numPages() { get numPages() {
return this.pdfInfo.numPages; return this._pdfInfo.numPages;
}, },
/** /**
* @return {string} A unique ID to identify a PDF. Not guaranteed to be * @return {string} A unique ID to identify a PDF. Not guaranteed to be
* unique. * unique.
*/ */
get fingerprint() { get fingerprint() {
return this.pdfInfo.fingerprint; return this._pdfInfo.fingerprint;
}, },
/** /**
* @param {number} pageNumber The page number to get. The first page is 1. * @param {number} pageNumber The page number to get. The first page is 1.