Re-factor how HCM highlight-filters are handled in the viewer components (PR 16593 follow-up)

This is something that I completely overlooked during review of PR 16593, since the idea is (obviously) that the viewer-components should be usable as-is without the user needing to manually pass in any *additional* parameters.

To support this we can very easily expose the current `FilterFactory`-instance on the `PDFPageProxy`-class[1], and if needed initialize the highlight-filters when initializing the page (again limited to the viewer-components).
This commit is contained in:
Jonas Jenwald 2023-06-26 23:12:37 +02:00
parent c4a61a7692
commit a024cd0127
3 changed files with 25 additions and 24 deletions

View file

@ -916,7 +916,6 @@ class PDFViewer {
pageColors: this.pageColors,
l10n: this.l10n,
layerProperties,
filterFactory: pdfDocument.filterFactory,
});
this._pages.push(pageView);
}