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:
parent
f7fd1db52f
commit
cace2e9047
3 changed files with 67 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue