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:
parent
ce62373db3
commit
4055d0a302
3 changed files with 40 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue