1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Merge pull request #13542 from calixteman/center_radio

XFA - Center vertically radio without caption
This commit is contained in:
calixteman 2021-06-11 17:55:55 +02:00 committed by GitHub
commit 2dc22394e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -2391,6 +2391,8 @@ class Field extends XFAObject {
const caption = this.caption ? this.caption[$toHTML]().html : null;
if (!caption) {
// Even if no caption this class will help to center the ui.
ui.attributes.class.push("xfaLeft");
return HTMLResult.success(createWrapper(this, html), bbox);
}

View file

@ -125,7 +125,7 @@ class XfaLayer {
static render(parameters) {
const storage = parameters.annotationStorage;
const root = parameters.xfa;
const intent = parameters.intent;
const intent = parameters.intent || "display";
const rootHtml = document.createElement(root.name);
if (root.attributes) {
this.setAttributes(rootHtml, root);