1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #16554 from calixteman/issue16553

Add a container for Signature with their own canvas
This commit is contained in:
calixteman 2023-06-15 16:20:54 +02:00 committed by GitHub
commit 9f60686c59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 0 deletions

View file

@ -100,6 +100,8 @@ class AnnotationElementFactory {
return new PushButtonWidgetAnnotationElement(parameters);
case "Ch":
return new ChoiceWidgetAnnotationElement(parameters);
case "Sig":
return new SignatureWidgetAnnotationElement(parameters);
}
return new WidgetAnnotationElement(parameters);
@ -1373,6 +1375,12 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
}
}
class SignatureWidgetAnnotationElement extends WidgetAnnotationElement {
constructor(parameters) {
super(parameters, { isRenderable: !!parameters.data.hasOwnCanvas });
}
}
class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {
constructor(parameters) {
super(parameters, { isRenderable: parameters.renderForms });