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

Implement support for square annotations

This commit is contained in:
Tim van der Meij 2017-07-24 00:11:27 +02:00
parent f7fd1db52f
commit cace2e9047
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762
3 changed files with 67 additions and 1 deletions

View file

@ -81,6 +81,9 @@ class AnnotationFactory {
case 'Line':
return new LineAnnotation(parameters);
case 'Square':
return new SquareAnnotation(parameters);
case 'Highlight':
return new HighlightAnnotation(parameters);
@ -886,6 +889,15 @@ class LineAnnotation extends Annotation {
}
}
class SquareAnnotation extends Annotation {
constructor(parameters) {
super(parameters);
this.data.annotationType = AnnotationType.SQUARE;
this._preparePopup(parameters.dict);
}
}
class HighlightAnnotation extends Annotation {
constructor(parameters) {
super(parameters);