Introduce a "thumbnailrendered" event to simplify cleanup after thumbnail rendering (PR 12613 follow-up)

The way that the cleanup was implemented in PR 12613 has always bothered me slightly, since the `isPageCached`-method that I introduced there always felt quite out-of-place in the `IPDFLinkService`-implementations.
By introducing a new "thumbnailrendered" event, similar to the existing "pagerendered" one, we're able to move the cleanup handling into the `PDFViewer`-class instead.
This commit is contained in:
Jonas Jenwald 2023-05-25 14:29:30 +02:00
parent 6d8810b55c
commit bc8523ac29
6 changed files with 31 additions and 47 deletions

View file

@ -533,6 +533,7 @@ const PDFViewerApplication = {
if (appConfig.sidebar?.thumbnailView) {
this.pdfThumbnailViewer = new PDFThumbnailViewer({
container: appConfig.sidebar.thumbnailView,
eventBus,
renderingQueue: pdfRenderingQueue,
linkService: pdfLinkService,
l10n: this.l10n,