mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #15778 from Snuffleupagus/keep-structTree
Don't re-create the `structTreeLayer` on zooming and rotation
This commit is contained in:
commit
cdd39ec69e
6 changed files with 51 additions and 86 deletions
|
@ -1623,9 +1623,7 @@ class PDFPageProxy {
|
|||
* or `null` when no structure tree is present for the current page.
|
||||
*/
|
||||
getStructTree() {
|
||||
return (this._structTreePromise ||= this._transport.getStructTree(
|
||||
this._pageIndex
|
||||
));
|
||||
return this._transport.getStructTree(this._pageIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1659,7 +1657,6 @@ class PDFPageProxy {
|
|||
this._bitmaps.clear();
|
||||
this._annotationPromises.clear();
|
||||
this._jsActionsPromise = null;
|
||||
this._structTreePromise = null;
|
||||
this.pendingCleanup = false;
|
||||
return Promise.all(waitOn);
|
||||
}
|
||||
|
@ -1694,7 +1691,6 @@ class PDFPageProxy {
|
|||
this.objs.clear();
|
||||
this._annotationPromises.clear();
|
||||
this._jsActionsPromise = null;
|
||||
this._structTreePromise = null;
|
||||
if (resetStats && this._stats) {
|
||||
this._stats = new StatTimer();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue