1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Implement caret annotations

The file `test/pdfs/annotation-caret-ink.pdf` is already available in
the repository as a reference test for this since I supplied it for
another patch that implemented ink annotations.
This commit is contained in:
Tim van der Meij 2019-04-09 23:35:32 +02:00
parent ce62373db3
commit 4055d0a302
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762
3 changed files with 40 additions and 0 deletions

View file

@ -107,6 +107,9 @@ class AnnotationFactory {
case 'Polygon':
return new PolygonAnnotation(parameters);
case 'Caret':
return new CaretAnnotation(parameters);
case 'Ink':
return new InkAnnotation(parameters);
@ -1026,6 +1029,15 @@ class PolygonAnnotation extends PolylineAnnotation {
}
}
class CaretAnnotation extends Annotation {
constructor(parameters) {
super(parameters);
this.data.annotationType = AnnotationType.CARET;
this._preparePopup(parameters.dict);
}
}
class InkAnnotation extends Annotation {
constructor(parameters) {
super(parameters);