fix(annotation): invoke sigature background creation to fix z-index problem
This commit is contained in:
parent
a1f4898c35
commit
b5d744c1cd
@ -2,12 +2,12 @@
|
||||
async function createAnnotations(document) {
|
||||
const signatures = [];
|
||||
|
||||
for(var element of document.elements) {
|
||||
for (let element of document.elements) {
|
||||
const annotParams = await getAnnotationParams(element.left, element.top);
|
||||
const page = element.page - 1
|
||||
|
||||
|
||||
//#region background
|
||||
if(annotParams.background){
|
||||
if (annotParams.background) {
|
||||
let background = annotParams.background;
|
||||
const id_background = PSPDFKit.generateInstantId();
|
||||
const annotation_background = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||
@ -22,18 +22,23 @@ async function createAnnotations(document) {
|
||||
borderWidth: background.borderWidth,
|
||||
borderColor: background?.borderColor ? new PSPDFKit.Color(background.borderColor) : null
|
||||
});
|
||||
|
||||
|
||||
const formFieldBackground = new PSPDFKit.FormFields.ButtonFormField({
|
||||
name: id_background,
|
||||
annotationIds: PSPDFKit.Immutable.List([annotation_background.id]),
|
||||
value: "",
|
||||
readOnly: false
|
||||
readOnly: true
|
||||
});
|
||||
|
||||
signatures.push(annotation_background)
|
||||
signatures.push(formFieldBackground)
|
||||
}
|
||||
//#endregion
|
||||
}
|
||||
|
||||
for (let element of document.elements) {
|
||||
const annotParams = await getAnnotationParams(element.left, element.top);
|
||||
const page = element.page - 1
|
||||
|
||||
//#region signatures
|
||||
const id = PSPDFKit.generateInstantId()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user