mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Handle appending consistently in the xfaLayer regardless of rendering intent (PR 17177 follow-up)
After PR 17177 the interface of `XfaLayerBuilder` is now inconsistent, since whether or not we directly append the xfaLayer to the DOM now depends on the rendering intent.
This commit is contained in:
parent
fbfacf8828
commit
097f214222
3 changed files with 3 additions and 8 deletions
|
@ -24,7 +24,6 @@ import { XfaLayer } from "pdfjs-lib";
|
|||
|
||||
/**
|
||||
* @typedef {Object} XfaLayerBuilderOptions
|
||||
* @property {HTMLDivElement} pageDiv
|
||||
* @property {PDFPageProxy} pdfPage
|
||||
* @property {AnnotationStorage} [annotationStorage]
|
||||
* @property {IPDFLinkService} linkService
|
||||
|
@ -36,13 +35,11 @@ class XfaLayerBuilder {
|
|||
* @param {XfaLayerBuilderOptions} options
|
||||
*/
|
||||
constructor({
|
||||
pageDiv,
|
||||
pdfPage,
|
||||
annotationStorage = null,
|
||||
linkService,
|
||||
xfaHtml = null,
|
||||
}) {
|
||||
this.pageDiv = pageDiv;
|
||||
this.pdfPage = pdfPage;
|
||||
this.annotationStorage = annotationStorage;
|
||||
this.linkService = linkService;
|
||||
|
@ -71,9 +68,8 @@ class XfaLayerBuilder {
|
|||
};
|
||||
|
||||
// Create an xfa layer div and render the form
|
||||
const div = document.createElement("div");
|
||||
this.pageDiv.append(div);
|
||||
parameters.div = div;
|
||||
this.div = document.createElement("div");
|
||||
parameters.div = this.div;
|
||||
|
||||
return XfaLayer.render(parameters);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue