mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Implement support for circle annotations
This commit is contained in:
parent
cace2e9047
commit
44c116ac49
3 changed files with 66 additions and 2 deletions
|
@ -84,6 +84,9 @@ class AnnotationFactory {
|
|||
case 'Square':
|
||||
return new SquareAnnotation(parameters);
|
||||
|
||||
case 'Circle':
|
||||
return new CircleAnnotation(parameters);
|
||||
|
||||
case 'Highlight':
|
||||
return new HighlightAnnotation(parameters);
|
||||
|
||||
|
@ -898,6 +901,15 @@ class SquareAnnotation extends Annotation {
|
|||
}
|
||||
}
|
||||
|
||||
class CircleAnnotation extends Annotation {
|
||||
constructor(parameters) {
|
||||
super(parameters);
|
||||
|
||||
this.data.annotationType = AnnotationType.CIRCLE;
|
||||
this._preparePopup(parameters.dict);
|
||||
}
|
||||
}
|
||||
|
||||
class HighlightAnnotation extends Annotation {
|
||||
constructor(parameters) {
|
||||
super(parameters);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue