mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
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:
parent
c4a61a7692
commit
a024cd0127
3 changed files with 25 additions and 24 deletions
|
@ -1381,6 +1381,13 @@ class PDFPageProxy {
|
|||
return this._transport.getPageJSActions(this._pageIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {Object} The filter factory instance.
|
||||
*/
|
||||
get filterFactory() {
|
||||
return this._transport.filterFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {boolean} True if only XFA form.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue