Mark some internal PDFDocumentProxy-properties as "private"

These two properties were *never* intended to be anything but "private", hence it really cannot hurt to actually indicate that they're *not* part of any official API.
This commit is contained in:
Jonas Jenwald 2021-04-02 12:26:32 +02:00
parent ca7f546828
commit 48ff20493f

View File

@ -1180,14 +1180,14 @@ class PDFPageProxy {
* {Array} of the annotation objects. * {Array} of the annotation objects.
*/ */
getAnnotations({ intent = null } = {}) { getAnnotations({ intent = null } = {}) {
if (!this.annotationsPromise || this.annotationsIntent !== intent) { if (!this._annotationsPromise || this._annotationsIntent !== intent) {
this.annotationsPromise = this._transport.getAnnotations( this._annotationsPromise = this._transport.getAnnotations(
this._pageIndex, this._pageIndex,
intent intent
); );
this.annotationsIntent = intent; this._annotationsIntent = intent;
} }
return this.annotationsPromise; return this._annotationsPromise;
} }
/** /**
@ -1490,7 +1490,7 @@ class PDFPageProxy {
} }
} }
this.objs.clear(); this.objs.clear();
this.annotationsPromise = null; this._annotationsPromise = null;
this._jsActionsPromise = null; this._jsActionsPromise = null;
this._xfaPromise = null; this._xfaPromise = null;
this.pendingCleanup = false; this.pendingCleanup = false;
@ -1525,7 +1525,7 @@ class PDFPageProxy {
this._intentStates.clear(); this._intentStates.clear();
this.objs.clear(); this.objs.clear();
this.annotationsPromise = null; this._annotationsPromise = null;
this._jsActionsPromise = null; this._jsActionsPromise = null;
this._xfaPromise = null; this._xfaPromise = null;
if (resetStats && this._stats) { if (resetStats && this._stats) {