Skip to content

Commit dfdaa50

Browse files
committed
Expose detail view area and tweak page events
1 parent b73deb5 commit dfdaa50

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

web/pdf_page_detail_view.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ class PDFPageDetailView extends BasePDFPageView {
4141
this.pageView.setPdfPage(pdfPage);
4242
}
4343

44+
get detailArea() {
45+
return this.#detailArea;
46+
}
47+
4448
get pdfPage() {
4549
return this.pageView.pdfPage;
4650
}

web/pdf_page_view.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ class PDFPageView extends BasePDFPageView {
417417
}
418418

419419
destroy() {
420-
window.onDetachPage && window.onDetachPage(this);
420+
window.onDestroyPage && window.onDestroyPage(this);
421421
this.reset();
422422
this.pdfPage?.cleanup();
423423
}
@@ -1185,8 +1185,6 @@ class PDFPageView extends BasePDFPageView {
11851185
);
11861186

11871187
const textLayerPromise = this.#renderTextLayer();
1188-
this.textLayerPromise = textLayerPromise;
1189-
textLayerPromise.then(() => window.onAttachPage && window.onAttachPage(this));
11901188

11911189
if (this.annotationLayer) {
11921190
await this.#renderAnnotationLayer();

0 commit comments

Comments
 (0)