mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Use the updatetextlayermatches
event for highlighting matches on a page
This makes use of the event bus instead of requiring the PDF viewer instance to get the page view for a page and calling `updateMatches` on it.
This commit is contained in:
parent
7aca53b1a4
commit
b14c1fbc28
2 changed files with 5 additions and 5 deletions
|
@ -358,7 +358,7 @@ class TextLayerBuilder {
|
|||
}
|
||||
};
|
||||
_boundEvents.updateTextLayerMatches = (evt) => {
|
||||
if (evt.pageIndex !== -1) {
|
||||
if (evt.pageIndex !== this.pageIdx && evt.pageIndex !== -1) {
|
||||
return;
|
||||
}
|
||||
this.updateMatches();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue