Skip to content

Commit

Permalink
Update pdf.js
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Oct 3, 2021
1 parent ed15973 commit fdee2be
Show file tree
Hide file tree
Showing 9 changed files with 514 additions and 142 deletions.
282 changes: 251 additions & 31 deletions build/pdf.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/pdf.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/pdf.sandbox.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/pdf.sandbox.js.map

Large diffs are not rendered by default.

260 changes: 195 additions & 65 deletions build/pdf.worker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/pdf.worker.js.map

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions web/viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
}


:root {
--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");
}

.annotationLayer section {
position: absolute;
text-align: initial;
Expand Down Expand Up @@ -128,7 +132,7 @@
.annotationLayer .choiceWidgetAnnotation select,
.annotationLayer .buttonWidgetAnnotation.checkBox input,
.annotationLayer .buttonWidgetAnnotation.radioButton input {
background-color: rgba(0, 54, 255, 0.13);
background-image: var(--annotation-unfocused-field-background);
border: 1px solid transparent;
box-sizing: border-box;
font-size: 9px;
Expand Down Expand Up @@ -183,6 +187,8 @@
.annotationLayer .choiceWidgetAnnotation select :focus,
.annotationLayer .buttonWidgetAnnotation.checkBox :focus,
.annotationLayer .buttonWidgetAnnotation.radioButton :focus {
background-image: none;
background-color: transparent;
outline: auto;
}

Expand Down Expand Up @@ -224,16 +230,6 @@
padding-right: 0;
}

.annotationLayer .textWidgetAnnotation input.comb:focus {
/*
* Letter spacing is placed on the right side of each character. Hence, the
* letter spacing of the last character may be placed outside the visible
* area, causing horizontal scrolling. We avoid this by extending the width
* when the element has focus and revert this when it loses focus.
*/
width: 103%;
}

.annotationLayer .buttonWidgetAnnotation.checkBox input,
.annotationLayer .buttonWidgetAnnotation.radioButton input {
-webkit-appearance: none;
Expand Down Expand Up @@ -301,7 +297,7 @@


:root {
--unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");
--xfa-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");
}

.xfaLayer .highlight {
Expand Down Expand Up @@ -493,7 +489,7 @@
flex: 1 1 auto;
border: none;
resize: none;
background-image: var(--unfocused-field-background);
background-image: var(--xfa-unfocused-field-background);
}

.xfaTop > .xfaTextfield,
Expand All @@ -511,6 +507,11 @@
text-align: center;
}

.xfaLink {
width: 100%;
height: 100%;
}

.xfaCheckbox,
.xfaRadio {
width: 100%;
Expand Down
73 changes: 47 additions & 26 deletions web/viewer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/viewer.js.map

Large diffs are not rendered by default.

0 comments on commit fdee2be

Please sign in to comment.