mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
[api-minor] Remove the default-factories from the viewer components (PR 15811 follow-up)
The changes in PR 15811 have now been included in no less than six official releases, hence it should hopefully be OK to remove this now.
This commit is contained in:
parent
e9ccbd2856
commit
c5e4a22ee0
2 changed files with 0 additions and 66 deletions
|
@ -52,20 +52,6 @@ const loadingTask = pdfjsLib.getDocument({
|
|||
// Document loaded, retrieving the page.
|
||||
const pdfPage = await pdfDocument.getPage(PAGE_TO_VIEW);
|
||||
|
||||
const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(pdfjsLib.version);
|
||||
if (match && (match[1] | 0) >= 3 && (match[2] | 0) >= 2) {
|
||||
// Creating the page view with default parameters.
|
||||
const pdfPageView = new pdfjsViewer.PDFPageView({
|
||||
container,
|
||||
id: PAGE_TO_VIEW,
|
||||
scale: SCALE,
|
||||
defaultViewport: pdfPage.getViewport({ scale: SCALE }),
|
||||
eventBus,
|
||||
});
|
||||
// Associate the actual page with the view, and draw it.
|
||||
pdfPageView.setPdfPage(pdfPage);
|
||||
return pdfPageView.draw();
|
||||
}
|
||||
// Creating the page view with default parameters.
|
||||
const pdfPageView = new pdfjsViewer.PDFPageView({
|
||||
container,
|
||||
|
@ -73,15 +59,6 @@ const loadingTask = pdfjsLib.getDocument({
|
|||
scale: SCALE,
|
||||
defaultViewport: pdfPage.getViewport({ scale: SCALE }),
|
||||
eventBus,
|
||||
// We can enable text/annotation/xfa/struct-layers, as needed.
|
||||
textLayerFactory: !pdfDocument.isPureXfa
|
||||
? new pdfjsViewer.DefaultTextLayerFactory()
|
||||
: null,
|
||||
annotationLayerFactory: new pdfjsViewer.DefaultAnnotationLayerFactory(),
|
||||
xfaLayerFactory: pdfDocument.isPureXfa
|
||||
? new pdfjsViewer.DefaultXfaLayerFactory()
|
||||
: null,
|
||||
structTreeLayerFactory: new pdfjsViewer.DefaultStructTreeLayerFactory(),
|
||||
});
|
||||
// Associate the actual page with the view, and draw it.
|
||||
pdfPageView.setPdfPage(pdfPage);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue