1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #13221 from Snuffleupagus/structTree-fixes

[api-minor] A couple of smaller `PDFPageProxy.getStructTree` fixes (PR 13171 follow-up)
This commit is contained in:
Tim van der Meij 2021-04-11 18:32:50 +02:00 committed by GitHub
commit 646bb07884
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 79 additions and 1 deletions

View file

@ -619,6 +619,9 @@ class PDFPageView {
this.eventBus._off("textlayerrendered", this._onTextLayerRendered);
this._onTextLayerRendered = null;
this.pdfPage.getStructTree().then(tree => {
if (!tree) {
return;
}
const treeDom = this.structTreeLayer.render(tree);
treeDom.classList.add("structTree");
this.canvas.appendChild(treeDom);