1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Use the link service for getting and setting page information

This removes the dependency on a `PDFViewer` instance from the find
controller, which makes it more similar to other components and makes it
easier to unit test with a mock link service.

Finally, we remove the search capabilities from the SVG example since it
doesn't work there because there is no separate text layer.
This commit is contained in:
Tim van der Meij 2018-09-21 19:40:11 +02:00
parent e293c12afc
commit e0c811f2ed
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762
5 changed files with 21 additions and 24 deletions

View file

@ -46,7 +46,7 @@ pdfLinkService.setViewer(pdfViewer);
// (Optionally) enable find controller.
var pdfFindController = new pdfjsViewer.PDFFindController({
pdfViewer: pdfViewer,
linkService: pdfLinkService,
});
pdfViewer.setFindController(pdfFindController);