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

Add a container for Signature with their own canvas

This commit is contained in:
Calixte Denizet 2023-06-15 13:01:01 +02:00
parent 9af50dc358
commit be25ee12bb
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 });